summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-07-26 14:04:56 (GMT)
committerGitHub <noreply@github.com>2018-07-26 14:04:56 (GMT)
commitd145775b451bbae549391eb49ed612fb3b03bde1 (patch)
tree8c30d8a56bc8016322c4e2680e1d6a32818f0030 /Include
parent5473f061f518aef5367a535999a407305fb12aff (diff)
downloadcpython-d145775b451bbae549391eb49ed612fb3b03bde1.zip
cpython-d145775b451bbae549391eb49ed612fb3b03bde1.tar.gz
cpython-d145775b451bbae549391eb49ed612fb3b03bde1.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/pystate.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index f59d26b..a35fc89 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -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, \