mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-41340: Removed fallback implementation for strdup (GH-21634)
This commit is contained in:
parent
f1d40f941a
commit
5798f78777
5 changed files with 2 additions and 29 deletions
|
@ -1,12 +0,0 @@
|
|||
/* 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue