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 "_").
This commit is contained in:
Victor Stinner 2018-09-17 15:13:17 -07:00 • committed by GitHub
parent c62ab2862d
commit 188ebfa475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 32 deletions

View file

@ -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, \