Skip to content

Commit 9cfc002

Browse files
authored
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.
1 parent 51eb1c6 commit 9cfc002

File tree

3 files changed

+380
-339
lines changed

3 files changed

+380
-339
lines changed

Include/pystate.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ typedef PyObject* (*_PyFrameEvalFunction)(struct _frame *, int);
2525

2626

2727
typedef struct {
28+
int install_signal_handlers; /* Install signal handlers? -1 means unset */
2829
int ignore_environment; /* -E */
2930
int use_hash_seed; /* PYTHONHASHSEED=x */
3031
unsigned long hash_seed;
@@ -62,6 +63,7 @@ typedef struct {
6263

6364
#define _PyCoreConfig_INIT \
6465
(_PyCoreConfig){ \
66+
.install_signal_handlers = -1, \
6567
.use_hash_seed = -1, \
6668
.coerce_c_locale = -1, \
6769
.utf8_mode = -1, \
@@ -73,7 +75,7 @@ typedef struct {
7375
* See PEP 432 for final anticipated contents
7476
*/
7577
typedef struct {
76-
int install_signal_handlers;
78+
int install_signal_handlers; /* Install signal handlers? -1 means unset */
7779
PyObject *argv; /* sys.argv list, can be NULL */
7880
PyObject *executable; /* sys.executable str */
7981
PyObject *prefix; /* sys.prefix str */

0 commit comments

Comments
 (0)