summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h5
-rw-r--r--Include/pystate.h8
2 files changed, 10 insertions, 3 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index dcb7fcb..3ea8ad6 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -105,6 +105,9 @@ 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
+PyAPI_FUNC(int) _Py_UnixMain(int argc, char **argv);
+#endif
/* In getpath.c */
PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
@@ -194,7 +197,7 @@ PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
/* Legacy locale support */
#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _Py_CoerceLegacyLocale(void);
+PyAPI_FUNC(void) _Py_CoerceLegacyLocale(const _PyCoreConfig *config);
PyAPI_FUNC(int) _Py_LegacyLocaleDetected(void);
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
#endif
diff --git a/Include/pystate.h b/Include/pystate.h
index a56c9b4..fff134a 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -38,7 +38,10 @@ typedef struct {
int show_alloc_count; /* -X showalloccount */
int dump_refs; /* PYTHONDUMPREFS */
int malloc_stats; /* PYTHONMALLOCSTATS */
- int utf8_mode; /* -X utf8 or PYTHONUTF8 environment variable */
+ int coerce_c_locale; /* PYTHONCOERCECLOCALE, -1 means unknown */
+ int coerce_c_locale_warn; /* PYTHONCOERCECLOCALE=warn */
+ int utf8_mode; /* -X utf8 or PYTHONUTF8 environment variable,
+ -1 means unknown */
wchar_t *module_search_path_env; /* PYTHONPATH environment variable */
wchar_t *home; /* PYTHONHOME environment variable,
@@ -46,7 +49,8 @@ typedef struct {
wchar_t *program_name; /* Program name, see also Py_GetProgramName() */
} _PyCoreConfig;
-#define _PyCoreConfig_INIT (_PyCoreConfig){.use_hash_seed = -1}
+#define _PyCoreConfig_INIT \
+ (_PyCoreConfig){.use_hash_seed = -1, .coerce_c_locale = -1, .utf8_mode = -1}
/* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */
/* Placeholders while working on the new configuration API