summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
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 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;
}