mirror of
https://github.com/python/cpython.git
synced 2025-07-13 06:15:17 +00:00
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.
This commit is contained in:
parent
a70232f288
commit
11a247df88
5 changed files with 207 additions and 141 deletions
|
@ -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, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue