diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-10-30 12:59:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 12:59:20 +0100 |
commit | 21220bbe65108f5a763ead24a6b572f80d84c9e2 (patch) | |
tree | 9461c9327a7b4129f2a67dd256d1e23993cc906b /Include | |
parent | 58f7bf3a892031616a6b06ef4b8d36e2ebec172b (diff) | |
download | cpython-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.h | 4 |
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 |