summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-05 16:37:44 (GMT)
committerGitHub <noreply@github.com>2019-03-05 16:37:44 (GMT)
commitb35be4b3334fbc471a39abbeb68110867b72e3e5 (patch)
tree4c311249db97ae7ebc5d2cb9ed48791549512afe /Include
parent359a2f3daba49fde0d3a07fb3c7a8b051c450d08 (diff)
downloadcpython-b35be4b3334fbc471a39abbeb68110867b72e3e5.zip
cpython-b35be4b3334fbc471a39abbeb68110867b72e3e5.tar.gz
cpython-b35be4b3334fbc471a39abbeb68110867b72e3e5.tar.bz2
bpo-36142: Add _PyPreConfig.allocator (GH-12181)
* Move 'allocator' and 'dev_mode' fields from _PyCoreConfig to _PyPreConfig. * Fix InitConfigTests of test_embed: dev_mode sets allocator to "debug", add a new tests for env vars with dev mode enabled.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/coreconfig.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h
index 306577c..2673576 100644
--- a/Include/cpython/coreconfig.h
+++ b/Include/cpython/coreconfig.h
@@ -80,6 +80,9 @@ typedef struct {
Set by -X utf8 command line option and PYTHONUTF8 environment variable.
If set to -1 (default), inherit Py_UTF8Mode value. */
int utf8_mode;
+
+ int dev_mode; /* Development mode. PYTHONDEVMODE, -X dev */
+ char *allocator; /* Memory allocator: PYTHONMALLOC */
} _PyPreConfig;
#ifdef MS_WINDOWS
@@ -109,9 +112,6 @@ typedef struct {
int use_hash_seed; /* PYTHONHASHSEED=x */
unsigned long hash_seed;
- const char *allocator; /* Memory allocator: PYTHONMALLOC */
- int dev_mode; /* PYTHONDEVMODE, -X dev */
-
/* Enable faulthandler?
Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
int faulthandler;