summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-09-19 21:56:36 (GMT)
committerGitHub <noreply@github.com>2018-09-19 21:56:36 (GMT)
commit06e7608207daab9fb82d13ccf2d3664535442f11 (patch)
tree690da78834ebfbe2f3f0316972bfcbde97a67a8f /Include
parent76531e2e82319a487d659bc469441bd4b8251608 (diff)
downloadcpython-06e7608207daab9fb82d13ccf2d3664535442f11.zip
cpython-06e7608207daab9fb82d13ccf2d3664535442f11.tar.gz
cpython-06e7608207daab9fb82d13ccf2d3664535442f11.tar.bz2
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')
-rw-r--r--Include/coreconfig.h29
-rw-r--r--Include/pylifecycle.h4
2 files changed, 3 insertions, 30 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h
index 293d8ed..ef043ab 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, \
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index f64bae3..04e672e 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -83,11 +83,7 @@ PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
/* Bootstrap __main__ (defined in Modules/main.c) */
PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
#ifdef Py_BUILD_CORE
-# ifdef MS_WINDOWS
-PyAPI_FUNC(int) _Py_WindowsMain(int argc, wchar_t **argv);
-# else
PyAPI_FUNC(int) _Py_UnixMain(int argc, char **argv);
-# endif
#endif
/* In getpath.c */