summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-25 16:54:58 (GMT)
committerGitHub <noreply@github.com>2019-03-25 16:54:58 (GMT)
commitf72346c47537657a287a862305f65eb5d7594fbf (patch)
treed97a19e2a156c04623bcefd32a16b851798a53af /Include/cpython
parent68d228f174ceed151200e7e0b44ffc5edd4e0ea2 (diff)
downloadcpython-f72346c47537657a287a862305f65eb5d7594fbf.zip
cpython-f72346c47537657a287a862305f65eb5d7594fbf.tar.gz
cpython-f72346c47537657a287a862305f65eb5d7594fbf.tar.bz2
bpo-36301: Cleanup preconfig code (GH-12535)
Prepare code to move some _PyPreConfig parameters into _PyPreCmdline. Changes: * _PyCoreConfig_ReadFromArgv(): remove preconfig parameter, use _PyRuntime.preconfig. * Add _PyPreCmdline_GetPreConfig() (called by _PyPreConfig_Read()). * Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv() * Factorize _Py_PreInitializeFromPreConfig() code: add pyinit_preinit(). * _PyPreConfig_Read() now sets coerce_c_locale to 2 if it must be coerced. * Remove _PyCoreConfig_ReadPreConfig(). * _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/coreconfig.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h
index bd28c37..8362209 100644
--- a/Include/cpython/coreconfig.h
+++ b/Include/cpython/coreconfig.h
@@ -73,7 +73,12 @@ typedef struct {
set to !Py_IgnoreEnvironmentFlag. */
int use_environment;
- int coerce_c_locale; /* PYTHONCOERCECLOCALE, -1 means unknown */
+ /* PYTHONCOERCECLOCALE, -1 means unknown.
+
+ If it is equal to 1, LC_CTYPE locale is read to decide it it should be
+ coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
+ if the LC_CTYPE locale must be coerced. */
+ int coerce_c_locale;
int coerce_c_locale_warn; /* PYTHONCOERCECLOCALE=warn */
#ifdef MS_WINDOWS