mirror of
https://github.com/python/cpython.git
synced 2024-11-28 04:15:11 +08:00
f2cf1e3e28
After the removal of pgen, multiple header and function prototypes that lack implementation or are unused are still lying around.
13 lines
251 B
C
13 lines
251 B
C
/* 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;
|
|
}
|