summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/coreconfig.h19
-rw-r--r--Include/pylifecycle.h2
2 files changed, 20 insertions, 1 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h
index ffba306..f46bc9d 100644
--- a/Include/coreconfig.h
+++ b/Include/coreconfig.h
@@ -66,6 +66,17 @@ typedef struct {
int coerce_c_locale; /* PYTHONCOERCECLOCALE, -1 means unknown */
int coerce_c_locale_warn; /* PYTHONCOERCECLOCALE=warn */
+ /* Python filesystem encoding and error handler: see
+ sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
+
+ Updated later by initfsencoding(). On Windows, can be updated by
+ sys._enablelegacywindowsfsencoding() at runtime.
+
+ See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors.
+ */
+ char *filesystem_encoding;
+ char *filesystem_errors;
+
/* Enable UTF-8 mode?
Set by -X utf8 command line option and PYTHONUTF8 environment variable.
If set to -1 (default), inherit Py_UTF8Mode value. */
@@ -325,6 +336,14 @@ PyAPI_FUNC(int) _PyCoreConfig_GetEnvDup(
#endif
+#ifdef Py_BUILD_CORE
+PyAPI_FUNC(int) _Py_SetFileSystemEncoding(
+ const char *encoding,
+ const char *errors);
+PyAPI_FUNC(void) _Py_ClearFileSystemEncoding(void);
+#endif
+
+
#ifdef __cplusplus
}
#endif
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index b96db1e..b84568e 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -175,7 +175,7 @@ PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
/* Legacy locale support */
#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _Py_CoerceLegacyLocale(const _PyCoreConfig *config);
+PyAPI_FUNC(void) _Py_CoerceLegacyLocale(int warn);
PyAPI_FUNC(int) _Py_LegacyLocaleDetected(void);
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
#endif