diff options
| author | Victor Stinner <vstinner@redhat.com> | 2018-09-19 14:56:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-19 14:56:36 -0700 |
| commit | 06e7608207daab9fb82d13ccf2d3664535442f11 (patch) | |
| tree | 690da78834ebfbe2f3f0316972bfcbde97a67a8f /Include/coreconfig.h | |
| parent | 76531e2e82319a487d659bc469441bd4b8251608 (diff) | |
| download | cpython-git-06e7608207daab9fb82d13ccf2d3664535442f11.tar.gz | |
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"
This reverts commit dbdee0073cf0b88fe541980ace1f650900f455cc.
* Revert "bpo-34589: C locale coercion off by default (GH-9073)"
This reverts commit 7a0791b6992d420dc52536257f2f093851ed7215.
* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"
This reverts commit 188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.
Diffstat (limited to 'Include/coreconfig.h')
| -rw-r--r-- | Include/coreconfig.h | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h index 293d8ed166..ef043ab02d 100644 --- a/Include/coreconfig.h +++ b/Include/coreconfig.h @@ -63,6 +63,8 @@ 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(). @@ -295,30 +297,6 @@ 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. - - Py_Initialize() and Py_Main() must not enable C locale coercion: it is - always disabled. The option can only be enabled by the Python program - ("python3). - - 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. - - Py_Initialize() and Py_Main() must not enable C locale coercion warning: - it is always disabled. The warning can only be enabled by the Python - program ("python3). - - See also the _coerce_c_locale option. */ - int _coerce_c_locale_warn; - } _PyCoreConfig; #ifdef MS_WINDOWS @@ -336,8 +314,7 @@ typedef struct { .use_hash_seed = -1, \ .faulthandler = -1, \ .tracemalloc = -1, \ - ._coerce_c_locale = 0, \ - ._coerce_c_locale_warn = 0, \ + .coerce_c_locale = -1, \ .utf8_mode = -1, \ .argc = -1, \ .nmodule_search_path = -1, \ |
