mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
pymain_set_sys_argv() now copies argv (#4838)
bpo-29240, bpo-32030: * Rename pymain_set_argv() to pymain_set_sys_argv() * pymain_set_sys_argv() now creates of copy of argv and modify the copy, rather than modifying pymain->argv * Call pymain_set_sys_argv() earlier: before pymain_run_python(), but after pymain_get_importer(). * Add _PySys_SetArgvWithError() to handle errors
This commit is contained in:
parent
981469794a
commit
d5dda98fa8
3 changed files with 89 additions and 36 deletions
|
|
@ -16,6 +16,12 @@ 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