summaryrefslogtreecommitdiffstats
path: root/Include/coreconfig.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-09-17 22:13:17 (GMT)
committerGitHub <noreply@github.com>2018-09-17 22:13:17 (GMT)
commit188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27 (patch)
treec13681a2bbd98f90055dd18e26cf9ceea2a8b40d /Include/coreconfig.h
parentc62ab2862db2382808bb2228760eebdda3f608bd (diff)
downloadcpython-188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.zip
cpython-188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.tar.gz
cpython-188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.tar.bz2
bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)
_PyCoreConfig: * Rename coerce_c_locale to _coerce_c_locale * Rename coerce_c_locale_warn to _coerce_c_locale_warn These fields are now private (name prefixed by "_").
Diffstat (limited to 'Include/coreconfig.h')
-rw-r--r--Include/coreconfig.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h
index ef043ab..8944ec2 100644
--- a/Include/coreconfig.h
+++ b/Include/coreconfig.h
@@ -63,8 +63,6 @@ typedef struct {
int show_alloc_count; /* -X showalloccount */
int dump_refs; /* PYTHONDUMPREFS */
int malloc_stats; /* PYTHONMALLOCSTATS */
- int coerce_c_locale; /* PYTHONCOERCECLOCALE, -1 means unknown */
- int coerce_c_locale_warn; /* PYTHONCOERCECLOCALE=warn */
/* Python filesystem encoding and error handler:
sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
@@ -297,6 +295,22 @@ typedef struct {
If set to -1 (default), inherit Py_FrozenFlag value. */
int _frozen;
+ /* C locale coercion (PEP 538).
+
+ The option is enabled by the PYTHONCOERCECLOCALE environment
+ variable. The option is also enabled if the LC_CTYPE locale is "C"
+ and a target locale (ex: "C.UTF-8") is supported by the platform.
+
+ See also the _coerce_c_locale_warn option. */
+ int _coerce_c_locale;
+
+ /* C locale coercion warning (PEP 538).
+
+ Enabled by the PYTHONCOERCECLOCALE=warn environment variable.
+
+ See also the _coerce_c_locale option. */
+ int _coerce_c_locale_warn;
+
} _PyCoreConfig;
#ifdef MS_WINDOWS
@@ -314,7 +328,7 @@ typedef struct {
.use_hash_seed = -1, \
.faulthandler = -1, \
.tracemalloc = -1, \
- .coerce_c_locale = -1, \
+ ._coerce_c_locale = -1, \
.utf8_mode = -1, \
.argc = -1, \
.nmodule_search_path = -1, \