Staging
v0.5.1
https://github.com/python/cpython
Revision 61b14151cc92021a10f94765eaa152ed04eb262a authored by Batuhan Taşkaya on 12 January 2020, 22:13:31 UTC, committed by Miss Islington (bot) on 12 January 2020, 22:13:31 UTC


https://bugs.python.org/issue39313


Automerge-Triggered-By: @pablogsal
1 parent 14dbe4b
Raw File
Tip revision: 61b14151cc92021a10f94765eaa152ed04eb262a authored by Batuhan Taşkaya on 12 January 2020, 22:13:31 UTC
bpo-39313: Add an option to RefactoringTool for using exec as a function (GH-17967)
Tip revision: 61b1415
strdup.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;
}
back to top