From 5c16c7b014f4cf975d25f667f6309933415e130d Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 10 Apr 2003 21:53:14 +0000 Subject: Move declaration of enc to scope where it is used --- Python/pythonrun.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/pythonrun.c') 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); -- cgit v1.2.1