summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-10 16:27:54 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-10 16:27:54 (GMT)
commit44b4b6a9a584dcf2c9a968e66ef5c03558ca503d (patch)
tree8e0da87329d9c83f9126760426ad9ae795388104 /Python
parent461c8131648e26d14e4840d11c3cbd1da99cd04f (diff)
downloadcpython-44b4b6a9a584dcf2c9a968e66ef5c03558ca503d.zip
cpython-44b4b6a9a584dcf2c9a968e66ef5c03558ca503d.tar.gz
cpython-44b4b6a9a584dcf2c9a968e66ef5c03558ca503d.tar.bz2
Fix compilation under Windows
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index aeaa9c0..26f4772 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;
}