]> granicus.if.org Git - python/commitdiff
#17115: I hate you MS for not supporting C99.
authorBrett Cannon <brett@python.org>
Sat, 4 May 2013 21:37:09 +0000 (17:37 -0400)
committerBrett Cannon <brett@python.org>
Sat, 4 May 2013 21:37:09 +0000 (17:37 -0400)
Python/pythonrun.c

index 75f1ef6a268261f3df56c54e74dfbe7a64f5a7b2..cf2ecf1cb1425d42bce5729b50d36f87a56f8968 100644 (file)
@@ -843,7 +843,7 @@ Py_GetPythonHome(void)
 static void
 initmain(PyInterpreterState *interp)
 {
-    PyObject *m, *d;
+    PyObject *m, *d, *loader;
     m = PyImport_AddModule("__main__");
     if (m == NULL)
         Py_FatalError("can't create __main__ module");
@@ -864,7 +864,7 @@ initmain(PyInterpreterState *interp)
      * be set if __main__ gets further initialized later in the startup
      * process.
      */
-    PyObject *loader = PyDict_GetItemString(d, "__loader__");
+    loader = PyDict_GetItemString(d, "__loader__");
     if (loader == NULL || loader == Py_None) {
         PyObject *loader = PyObject_GetAttrString(interp->importlib,
                                                   "BuiltinImporter");