diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2003-04-10 21:53:14 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-04-10 21:53:14 (GMT) |
commit | 5c16c7b014f4cf975d25f667f6309933415e130d (patch) | |
tree | 02cb59d8184bd8982296c3cb7d44e3f36e003d2b | |
parent | 4efd91713b7de53fdc30f4781b16ebfb7e7c8b9e (diff) | |
download | cpython-5c16c7b014f4cf975d25f667f6309933415e130d.zip cpython-5c16c7b014f4cf975d25f667f6309933415e130d.tar.gz cpython-5c16c7b014f4cf975d25f667f6309933415e130d.tar.bz2 |
Move declaration of enc to scope where it is used
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 32b3024..2de1bde 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -190,11 +190,10 @@ Py_Initialize(void) 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); |