Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 28574:be2ecafb15ad legacy-trunk
Move declaration of enc to scope where it is used
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Thu, 10 Apr 2003 21:53:14 +0000 |
| parents | 850626d47574 |
| children | b1671550c7e1 |
line wrap: on
line diff
--- a/Python/pythonrun.c Thu Apr 10 21:51:29 2003 +0000 +++ b/Python/pythonrun.c Thu Apr 10 21:53:14 2003 +0000 @@ -190,11 +190,10 @@ if (!Py_FileSystemDefaultEncoding) { char *saved_locale = setlocale(LC_CTYPE, NULL); char *codeset; - PyObject *enc = NULL; setlocale(LC_CTYPE, ""); codeset = nl_langinfo(CODESET); if (*codeset) { - enc = PyCodec_Encoder(codeset); + PyObject *enc = PyCodec_Encoder(codeset); if (enc) { Py_FileSystemDefaultEncoding = strdup(codeset); Py_DECREF(enc);
