]> granicus.if.org Git - python/commitdiff
Fix compilation under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 10 Jul 2012 16:27:54 +0000 (18:27 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 10 Jul 2012 16:27:54 +0000 (18:27 +0200)
Python/import.c

index aeaa9c05c3588ac6c605a595ebb943a3da88ba63..26f4772da7b9e7224cc5fd47c0ff2944d75eff9f 100644 (file)
@@ -426,12 +426,13 @@ PyImport_Cleanup(void)
 long
 PyImport_GetMagicNumber(void)
 {
+    long res;
     PyInterpreterState *interp = PyThreadState_Get()->interp;
     PyObject *pyc_magic = PyObject_GetAttrString(interp->importlib,
                                                  "_RAW_MAGIC_NUMBER");
     if (pyc_magic == NULL)
         return -1;
-    long res = PyLong_AsLong(pyc_magic);
+    res = PyLong_AsLong(pyc_magic);
     Py_DECREF(pyc_magic);
     return res;
 }