mirror of
https://github.com/python/cpython.git
synced 2024-12-13 11:54:54 +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;
|
|
}
|