| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/python-emscripten/cpython/master/Python/strdup.c | [Back] [Original] |
/* strdup() replacement (from stdwin, if you must know) */
char *
strdup(const char *str)
{
if (str != NULL) {
char *copy = malloc(strlen(str) + 1);
if (copy != NULL)
return strcpy(copy, str);
}
return NULL;
}
| Web Proxy Viewer | New URL | Original Page |