Mercurial > cpython-lru_cache-weakref
view Python/strdup.c @ 69179:2e4cdaffe493 2.7
Issue #11766: increase countdown waiting for a pool of processes to start
up. Hopefully fixes transient buildbot failures.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Wed, 06 Apr 2011 22:54:14 +0200 |
| 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; }
