Mercurial > cpython-lru_cache-weakref
view Python/strdup.c @ 74588:dfd05348331c
Sort functions in the doc of the time module
Move wallclock() at the end.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 24 Jan 2012 01:12:54 +0100 |
| parents | f79434ee41fa |
| children | e7f6cef7a4cc |
line wrap: on
line source
/* strdup() replacement (from stdwin, if you must know) */ #include "pgenheaders.h" char * strdup(const char *str) { if (str != NULL) { register char *copy = malloc(strlen(str) + 1); if (copy != NULL) return strcpy(copy, str); } return NULL; }
