summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-10-31 00:02:09 (GMT)
committerGitHub <noreply@github.com>2020-10-31 00:02:09 (GMT)
commit710e82630775774dceba5e8f24b1b10e6dfaf9b7 (patch)
treeb4415da3ed5f8bc2ad2a52ec9a8544b9e50d975f /Include/internal
parent06f8c3328dcd81c84d1ee2b3a57b5381dcb38482 (diff)
downloadcpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.zip
cpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.tar.gz
cpython-710e82630775774dceba5e8f24b1b10e6dfaf9b7.tar.bz2
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/internal')
-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 9cb5fc6..ff7bc48 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