diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 16:46:53 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 16:46:53 -0800 |
commit | b1a1742796fce8078f9f1f3d5e3161122fae3b0a (patch) | |
tree | 89c863764481b7c7fbe645be42b16e1d35e92751 /Python/pylifecycle.c | |
parent | 391ed6c73cb1964b57d0b538370a76d03d30511b (diff) | |
parent | cf1f5444eb42a8dc252b295d3863288309996a5d (diff) | |
download | cpython-b1a1742796fce8078f9f1f3d5e3161122fae3b0a.tar.gz |
Merge 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); |