mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-42260: Main init modify sys.flags in-place (GH-23150)
When Py_Initialize() is called twice, the second call now updates more sys attributes for the configuration, rather than only sys.argv. * Rename _PySys_InitMain() to _PySys_UpdateConfig(). * _PySys_UpdateConfig() now modifies sys.flags in-place, instead of creating a new flags object. * Remove old commented sys.flags flags (unbuffered and skip_first). * Add private _PySys_GetObject() function. * When Py_Initialize(), Py_InitializeFromConfig() and
This commit is contained in:
parent
58ca33b467
commit
af1d64d9f7
4 changed files with 90 additions and 75 deletions
|
|
@ -44,7 +44,7 @@ extern PyStatus _PySys_Create(
|
|||
PyObject **sysmod_p);
|
||||
extern PyStatus _PySys_ReadPreinitWarnOptions(PyWideStringList *options);
|
||||
extern PyStatus _PySys_ReadPreinitXOptions(PyConfig *config);
|
||||
extern int _PySys_InitMain(PyThreadState *tstate);
|
||||
extern int _PySys_UpdateConfig(PyThreadState *tstate);
|
||||
extern PyStatus _PyExc_Init(PyThreadState *tstate);
|
||||
extern PyStatus _PyErr_Init(void);
|
||||
extern PyStatus _PyBuiltins_AddExceptions(PyObject * bltinmod);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue