summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-13 20:05:57 (GMT)
committerGitHub <noreply@github.com>2017-12-13 20:05:57 (GMT)
commit11a247df88f15b51feff8a3c46005676bb29b96e (patch)
treec78bc87a6117fbac9856e1eb77a209862f70d4c3 /Include
parenta70232f28882d2fecb3ebe06643867701016070f (diff)
downloadcpython-11a247df88f15b51feff8a3c46005676bb29b96e.zip
cpython-11a247df88f15b51feff8a3c46005676bb29b96e.tar.gz
cpython-11a247df88f15b51feff8a3c46005676bb29b96e.tar.bz2
bpo-32030: Add _PyPathConfig_ComputeArgv0() (#4845)
Changes: * Split _PySys_SetArgvWithError() into subfunctions for Py_Main(): * Create the Python list object * Set sys.argv to the list * Compute argv0 * Prepend argv0 to sys.path * Add _PyPathConfig_ComputeArgv0() * Remove _PySys_SetArgvWithError() * Py_Main() now splits the code to compute sys.argv/path0 and the code to update the sys module: add pymain_compute_argv() subfunction.
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h1
-rw-r--r--Include/sysmodule.h6
2 files changed, 1 insertions, 6 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 5423060..17ed110 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -105,6 +105,7 @@ PyAPI_FUNC(wchar_t *) Py_GetPath(void);
#ifdef Py_BUILD_CORE
PyAPI_FUNC(_PyInitError) _PyPathConfig_Init(
const _PyMainInterpreterConfig *main_config);
+PyAPI_FUNC(PyObject*) _PyPathConfig_ComputeArgv0(int argc, wchar_t **argv);
#endif
PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
#ifdef MS_WINDOWS
diff --git a/Include/sysmodule.h b/Include/sysmodule.h
index b709629..719ecfc 100644
--- a/Include/sysmodule.h
+++ b/Include/sysmodule.h
@@ -16,12 +16,6 @@ PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *);
PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
-#ifdef Py_BUILD_CORE
-PyAPI_FUNC(_PyInitError) _PySys_SetArgvWithError(
- int argc,
- wchar_t **argv,
- int updatepath);
-#endif
PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)