aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-21 16:20:32 +0100
committerGitHub <noreply@github.com>2017-12-21 16:20:32 +0100
commit9dd762013fd9fcf975ad51700b55d050ca9ed60e (patch)
tree67e0bcd6b3884cfa23d983bb722ee492c8c5aad9 /Include/fileutils.h
parentbpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown... (diff)
downloadcpython-9dd762013fd9fcf975ad51700b55d050ca9ed60e.tar.gz
cpython-9dd762013fd9fcf975ad51700b55d050ca9ed60e.tar.bz2
cpython-9dd762013fd9fcf975ad51700b55d050ca9ed60e.zip
bpo-32030: Add _Py_EncodeLocaleRaw() (#4961)
Replace Py_EncodeLocale() with _Py_EncodeLocaleRaw() in: * _Py_wfopen() * _Py_wreadlink() * _Py_wrealpath() * _Py_wstat() * pymain_open_filename() These functions are called early during Python intialization, only the RAW memory allocator must be used.
Diffstat (limited to 'Include/fileutils.h')
-rw-r--r--Include/fileutils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index 900c70faad7..b7b6cd26c00 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -13,10 +13,13 @@ PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
PyAPI_FUNC(char*) Py_EncodeLocale(
const wchar_t *text,
size_t *error_pos);
+
+PyAPI_FUNC(char*) _Py_EncodeLocaleRaw(
+ const wchar_t *text,
+ size_t *error_pos);
#endif
#ifndef Py_LIMITED_API
-
PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
#ifdef MS_WINDOWS