From 95cc3ee00cfa079751ae2bb9a8d3387053b50489 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 19 Sep 2018 12:01:52 -0700 Subject: Revert "[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)" (GH-9416) This reverts commit 144f1e2c6f4a24bd288c045986842c65cc289684. --- Programs/_testembed.c | 9 ++++++--- Programs/python.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'Programs') diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 029f6ad4b6..6c35f9586b 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -328,8 +328,8 @@ dump_config(void) printf("dump_refs = %i\n", config->dump_refs); printf("malloc_stats = %i\n", config->malloc_stats); - printf("_coerce_c_locale = %i\n", config->_coerce_c_locale); - printf("_coerce_c_locale_warn = %i\n", config->_coerce_c_locale_warn); + printf("coerce_c_locale = %i\n", config->coerce_c_locale); + printf("coerce_c_locale_warn = %i\n", config->coerce_c_locale_warn); printf("utf8_mode = %i\n", config->utf8_mode); printf("program_name = %ls\n", config->program_name); @@ -473,6 +473,8 @@ static int test_init_from_config(void) putenv("PYTHONMALLOCSTATS=0"); config.malloc_stats = 1; + /* FIXME: test coerce_c_locale and coerce_c_locale_warn */ + putenv("PYTHONUTF8=0"); Py_UTF8Mode = 0; config.utf8_mode = 1; @@ -542,7 +544,8 @@ static int test_init_isolated(void) /* Test _PyCoreConfig.isolated=1 */ _PyCoreConfig config = _PyCoreConfig_INIT; - /* Set utf8_mode to not depend on the locale */ + /* Set coerce_c_locale and utf8_mode to not depend on the locale */ + config.coerce_c_locale = 0; config.utf8_mode = 0; /* Use path starting with "./" avoids a search along the PATH */ config.program_name = L"./_testembed"; diff --git a/Programs/python.c b/Programs/python.c index c7697facbe..78e48f800c 100644 --- a/Programs/python.c +++ b/Programs/python.c @@ -6,7 +6,7 @@ int wmain(int argc, wchar_t **argv) { - return _Py_WindowsMain(argc, argv); + return Py_Main(argc, argv); } #else int -- cgit v1.2.1