changeset 1 | 2fb8b9db1c86 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symbian-qemu-0.9.1-12/python-2.6.1/Python/strdup.c Fri Jul 31 15:01:17 2009 +0100 @@ -0,0 +1,14 @@ +/* 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; +}