diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Python/pylifecycle.c | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index a4f7f823bc..06030c330a 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -193,7 +193,8 @@ add_flag(int flag, const char *envs) static char* get_codec_name(const char *encoding) { - char *name_utf8, *name_str; + const char *name_utf8; + char *name_str; PyObject *codec, *name = NULL; codec = _PyCodec_Lookup(encoding); @@ -1284,8 +1285,7 @@ initstdio(void) when import.c tries to write to stderr in verbose mode. */ encoding_attr = PyObject_GetAttrString(std, "encoding"); if (encoding_attr != NULL) { - const char * std_encoding; - std_encoding = PyUnicode_AsUTF8(encoding_attr); + const char *std_encoding = PyUnicode_AsUTF8(encoding_attr); if (std_encoding != NULL) { PyObject *codec_info = _PyCodec_Lookup(std_encoding); Py_XDECREF(codec_info); |