Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 28179:04df965d675b legacy-trunk
Declare all variables at the start of their scope.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 05 Mar 2003 17:31:21 +0000 |
| parents | 3f90d21debe9 |
| children | 850626d47574 |
comparison
equal
deleted
inserted
replaced
| 28178:0a8e8632c631 | 28179:04df965d675b |
|---|---|
| 193 Python codec, and Py_FileSystemDefaultEncoding isn't | 193 Python codec, and Py_FileSystemDefaultEncoding isn't |
| 194 initialized by other means. */ | 194 initialized by other means. */ |
| 195 if (!Py_FileSystemDefaultEncoding) { | 195 if (!Py_FileSystemDefaultEncoding) { |
| 196 char *saved_locale = setlocale(LC_CTYPE, NULL); | 196 char *saved_locale = setlocale(LC_CTYPE, NULL); |
| 197 char *codeset; | 197 char *codeset; |
| 198 PyObject *enc = NULL; | |
| 198 setlocale(LC_CTYPE, ""); | 199 setlocale(LC_CTYPE, ""); |
| 199 codeset = nl_langinfo(CODESET); | 200 codeset = nl_langinfo(CODESET); |
| 200 PyObject *enc = NULL; | |
| 201 if (*codeset) { | 201 if (*codeset) { |
| 202 enc = PyCodec_Encoder(codeset); | 202 enc = PyCodec_Encoder(codeset); |
| 203 if (enc) { | 203 if (enc) { |
| 204 Py_FileSystemDefaultEncoding = strdup(codeset); | 204 Py_FileSystemDefaultEncoding = strdup(codeset); |
| 205 Py_DECREF(enc); | 205 Py_DECREF(enc); |
