summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-04-10 21:53:14 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2003-04-10 21:53:14 +0000
commit83f010ce24d51e1126fbfd3b588d2b4ce5e0de87 (patch)
treead8418184308cc8615ea07e574af767393ad9e2c /Python/pythonrun.c
parent64054b4763ef3f003854acc8b2d4f1207f466982 (diff)
downloadcpython-83f010ce24d51e1126fbfd3b588d2b4ce5e0de87.tar.gz
Move declaration of enc to scope where it is used
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 32b302455a..2de1bded56 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);