diff options
author | ?ukasz Langa <lukasz@langa.pl> | 2017-02-10 00:20:16 -0800 |
---|---|---|
committer | ?ukasz Langa <lukasz@langa.pl> | 2017-02-10 00:20:16 -0800 |
commit | 8972587fab93cd27ac78b4eab3805f5e11164cb9 (patch) | |
tree | 3b6b18367a3054c41f3a186d60c321ef9a08ee38 /Python/pylifecycle.c | |
parent | c7a3f78cc193bfa7fc874f49ec2e0799b32da817 (diff) | |
parent | 2328d19475109a50de26fa42832a5286824b0391 (diff) | |
download | cpython-8972587fab93cd27ac78b4eab3805f5e11164cb9.tar.gz |
Merge 3.6 (fix #29519)
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); |