diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-02 18:56:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 18:56:30 (GMT) |
commit | 709d23dee69e700b87d5a4cb59e149d0e1af7993 (patch) | |
tree | b06aafe79f83137a3c85649bcebf1fbfd2ea1240 /Include/cpython | |
parent | 6ae2bbbdfcb8969d1d362b17c2fbd5a684fa4f9d (diff) | |
download | cpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.zip cpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.tar.gz cpython-709d23dee69e700b87d5a4cb59e149d0e1af7993.tar.bz2 |
bpo-36775: _PyCoreConfig only uses wchar_t* (GH-13062)
_PyCoreConfig: Change filesystem_encoding, filesystem_errors,
stdio_encoding and stdio_errors fields type from char* to wchar_t*.
Changes:
* PyInterpreterState: replace fscodec_initialized (int) with fs_codec
structure.
* Add get_error_handler_wide() and unicode_encode_utf8() helper
functions.
* Add error_handler parameter to unicode_encode_locale()
and unicode_decode_locale().
* Remove _PyCoreConfig_SetString().
* Rename _PyCoreConfig_SetWideString() to _PyCoreConfig_SetString().
* Rename _PyCoreConfig_SetWideStringFromString()
to _PyCoreConfig_DecodeLocale().
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/coreconfig.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h index 1aab5e4..5672080 100644 --- a/Include/cpython/coreconfig.h +++ b/Include/cpython/coreconfig.h @@ -207,8 +207,8 @@ typedef struct { See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors. */ - char *filesystem_encoding; - char *filesystem_errors; + wchar_t *filesystem_encoding; + wchar_t *filesystem_errors; wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */ wchar_t *program_name; /* Program name, see also Py_GetProgramName() */ @@ -334,13 +334,13 @@ typedef struct { Value set from PYTHONIOENCODING environment variable and Py_SetStandardStreamEncoding() function. See also 'stdio_errors' attribute. */ - char *stdio_encoding; + wchar_t *stdio_encoding; /* Error handler of sys.stdin and sys.stdout. Value set from PYTHONIOENCODING environment variable and Py_SetStandardStreamEncoding() function. See also 'stdio_encoding' attribute. */ - char *stdio_errors; + wchar_t *stdio_errors; #ifdef MS_WINDOWS /* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys |