summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-30 12:59:20 +0100
committerGitHub <noreply@github.com>2018-10-30 12:59:20 +0100
commit21220bbe65108f5a763ead24a6b572f80d84c9e2 (patch)
tree9461c9327a7b4129f2a67dd256d1e23993cc906b /Include
parent58f7bf3a892031616a6b06ef4b8d36e2ebec172b (diff)
downloadcpython-git-21220bbe65108f5a763ead24a6b572f80d84c9e2.tar.gz
bpo-34403: Fix initfsencoding() for ASCII (GH-10233)
* Add _Py_GetForceASCII(): check if Python forces the usage of ASCII in Py_DecodeLocale() and Py_EncodeLocale(). * initfsencoding() now uses ASCII if _Py_GetForceASCII() is true.
Diffstat (limited to 'Include')
-rw-r--r--Include/fileutils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index c05ff43f51..d75189a95c 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -183,6 +183,10 @@ PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
#endif /* Py_LIMITED_API */
+#ifdef Py_BUILD_CORE
+PyAPI_FUNC(int) _Py_GetForceASCII(void);
+#endif
+
#ifdef __cplusplus
}
#endif