summaryrefslogtreecommitdiff
path: root/Programs
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-09-19 12:01:52 -0700
committerGitHub <noreply@github.com>2018-09-19 12:01:52 -0700
commit95cc3ee00cfa079751ae2bb9a8d3387053b50489 (patch)
tree9100630fcae5cd45caaf00aeff5e5f823646e162 /Programs
parent73c0006e71683b7d5b28192f18a2b9796e4195ef (diff)
downloadcpython-git-95cc3ee00cfa079751ae2bb9a8d3387053b50489.tar.gz
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.
Diffstat (limited to 'Programs')
-rw-r--r--Programs/_testembed.c9
-rw-r--r--Programs/python.c2
2 files changed, 7 insertions, 4 deletions
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