bpo-41340: Removed fallback implementation for strdup (GH-21634)

This commit is contained in:
wasiher 2020-07-27 12:28:45 +09:00 committed by GitHub
parent f1d40f941a
commit 5798f78777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 29 deletions

View file

@ -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;
}