Staging
v0.8.1
Revision dcf617152e1d4c4a5e7965733928858a9c0936ca authored by Victor Stinner on 19 March 2019, 15:09:27 UTC, committed by GitHub on 19 March 2019, 15:09:27 UTC
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.

Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].
1 parent f5f336a
Raw File
strdup.c
/* strdup() replacement (from stdwin, if you must know) */

#include "pgenheaders.h"

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