mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-34170: Cleanup pymain_read_conf() (GH-8476)
* Config: Rename ignore_environment field to use_environment. * _PyCoreConfig_Read(): if isolated is set, use_environment and site_import are now always set to 0. * Inline pymain_free_raw() into pymain_free() * Move config_init_warnoptions() call into pymain_read_conf_impl() * _PyCoreConfig_Read(): don't replace values if they are already set: faulthandler, pycache_prefix, home.
This commit is contained in:
parent
5473f061f5
commit
d145775b45
3 changed files with 71 additions and 74 deletions
|
@ -29,9 +29,14 @@ typedef struct {
|
|||
/* Install signal handlers? Yes by default. */
|
||||
int install_signal_handlers;
|
||||
|
||||
int ignore_environment; /* -E, Py_IgnoreEnvironmentFlag, -1 means unset */
|
||||
/* If greater than 0: use environment variables.
|
||||
Set to 0 by -E command line option. If set to -1 (default), it is
|
||||
set to !Py_IgnoreEnvironmentFlag. */
|
||||
int use_environment;
|
||||
|
||||
int use_hash_seed; /* PYTHONHASHSEED=x */
|
||||
unsigned long hash_seed;
|
||||
|
||||
const char *allocator; /* Memory allocator: PYTHONMALLOC */
|
||||
int dev_mode; /* PYTHONDEVMODE, -X dev */
|
||||
|
||||
|
@ -238,7 +243,7 @@ typedef struct {
|
|||
#define _PyCoreConfig_INIT \
|
||||
(_PyCoreConfig){ \
|
||||
.install_signal_handlers = 1, \
|
||||
.ignore_environment = -1, \
|
||||
.use_environment = -1, \
|
||||
.use_hash_seed = -1, \
|
||||
.faulthandler = -1, \
|
||||
.tracemalloc = -1, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue