summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-10 18:27:54 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-10 18:27:54 +0200
commitbc5266671e1879adb2d293a7a0179a37db8c092b (patch)
treeefebd81df4572a60eb7bf0a2f1934c4bfc0c2f33 /Python/import.c
parentca68d48bed5fd51e23582923647b5883a2d56c7d (diff)
downloadcpython-bc5266671e1879adb2d293a7a0179a37db8c092b.tar.gz
Fix compilation under Windows
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index aeaa9c05c3..26f4772da7 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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;
}