aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-10-31 01:02:09 +0100
committerGitHub <noreply@github.com>2020-10-31 01:02:09 +0100
commit710e82630775774dceba5e8f24b1b10e6dfaf9b7 (patch)
treeb4415da3ed5f8bc2ad2a52ec9a8544b9e50d975f /Include
parentbpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_fl... (diff)
downloadcpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.tar.gz
cpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.tar.bz2
cpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.zip
bpo-42208: Add _Py_GetLocaleEncoding() (GH-23050)
_io.TextIOWrapper no longer calls getpreferredencoding(False) of _bootlocale to get the locale encoding, but calls _Py_GetLocaleEncoding() instead. Add config_get_fs_encoding() sub-function. Reorganize also config_get_locale_encoding() code.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_fileutils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_fileutils.h b/Include/internal/pycore_fileutils.h
index 9cb5fc66ee2..ff7bc4874c7 100644
--- a/Include/internal/pycore_fileutils.h
+++ b/Include/internal/pycore_fileutils.h
@@ -50,6 +50,8 @@ PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
PyAPI_FUNC(void) _Py_closerange(int first, int last);
+PyAPI_FUNC(PyObject*) _Py_GetLocaleEncoding(void);
+
#ifdef __cplusplus
}
#endif