mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-32030: Complete _PyCoreConfig_Read() (#4946)
* Add _PyCoreConfig.install_signal_handlers * Remove _PyMain.config: _PyMainInterpreterConfig usage is now restricted to pymain_init_python_main(). * Rename _PyMain.core_config to _PyMain.config * _PyMainInterpreterConfig_Read() now creates the xoptions dictionary from the core config * Fix _PyMainInterpreterConfig_Read(): don't replace xoptions and argv if they are already set.
This commit is contained in:
parent
51eb1c6b9c
commit
9cfc00262c
3 changed files with 387 additions and 346 deletions
|
@ -25,6 +25,7 @@ typedef PyObject* (*_PyFrameEvalFunction)(struct _frame *, int);
|
|||
|
||||
|
||||
typedef struct {
|
||||
int install_signal_handlers; /* Install signal handlers? -1 means unset */
|
||||
int ignore_environment; /* -E */
|
||||
int use_hash_seed; /* PYTHONHASHSEED=x */
|
||||
unsigned long hash_seed;
|
||||
|
@ -62,6 +63,7 @@ typedef struct {
|
|||
|
||||
#define _PyCoreConfig_INIT \
|
||||
(_PyCoreConfig){ \
|
||||
.install_signal_handlers = -1, \
|
||||
.use_hash_seed = -1, \
|
||||
.coerce_c_locale = -1, \
|
||||
.utf8_mode = -1, \
|
||||
|
@ -73,7 +75,7 @@ typedef struct {
|
|||
* See PEP 432 for final anticipated contents
|
||||
*/
|
||||
typedef struct {
|
||||
int install_signal_handlers;
|
||||
int install_signal_handlers; /* Install signal handlers? -1 means unset */
|
||||
PyObject *argv; /* sys.argv list, can be NULL */
|
||||
PyObject *executable; /* sys.executable str */
|
||||
PyObject *prefix; /* sys.prefix str */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue