summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_pathconfig.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-19 15:09:27 (GMT)
committerGitHub <noreply@github.com>2019-03-19 15:09:27 (GMT)
commitdcf617152e1d4c4a5e7965733928858a9c0936ca (patch)
tree61c2ce7f9a4bcb8a1f48efb1a24b0f50d4029372 /Include/internal/pycore_pathconfig.h
parentf5f336a819a3d881bb217bf8f9b5cacba03a4e45 (diff)
downloadcpython-dcf617152e1d4c4a5e7965733928858a9c0936ca.zip
cpython-dcf617152e1d4c4a5e7965733928858a9c0936ca.tar.gz
cpython-dcf617152e1d4c4a5e7965733928858a9c0936ca.tar.bz2
bpo-36236: Handle removed cwd at Python init (GH-12424)
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].
Diffstat (limited to 'Include/internal/pycore_pathconfig.h')
-rw-r--r--Include/internal/pycore_pathconfig.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/internal/pycore_pathconfig.h b/Include/internal/pycore_pathconfig.h
index d0938df..80d86a0 100644
--- a/Include/internal/pycore_pathconfig.h
+++ b/Include/internal/pycore_pathconfig.h
@@ -44,7 +44,9 @@ PyAPI_FUNC(_PyInitError) _PyPathConfig_SetGlobal(
PyAPI_FUNC(_PyInitError) _PyPathConfig_Calculate_impl(
_PyPathConfig *config,
const _PyCoreConfig *core_config);
-PyAPI_FUNC(PyObject*) _PyPathConfig_ComputeArgv0(const _PyWstrList *argv);
+PyAPI_FUNC(int) _PyPathConfig_ComputeSysPath0(
+ const _PyWstrList *argv,
+ PyObject **path0);
PyAPI_FUNC(int) _Py_FindEnvConfigValue(
FILE *env_file,
const wchar_t *key,