diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-13 16:31:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 16:31:16 (GMT) |
commit | d5dda98fa80405db82e2eb36ac48671b4c8c0983 (patch) | |
tree | ddece44d8035bccea47121caf6c55932ba44301e /Include | |
parent | 981469794af8c693174544265b0c19cbe6d2b457 (diff) | |
download | cpython-d5dda98fa80405db82e2eb36ac48671b4c8c0983.zip cpython-d5dda98fa80405db82e2eb36ac48671b4c8c0983.tar.gz cpython-d5dda98fa80405db82e2eb36ac48671b4c8c0983.tar.bz2 |
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
Diffstat (limited to 'Include')
-rw-r--r-- | Include/sysmodule.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/sysmodule.h b/Include/sysmodule.h index 719ecfc..b709629 100644 --- a/Include/sysmodule.h +++ b/Include/sysmodule.h @@ -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, ...) |