From: Antoine Pitrou Date: Tue, 10 Jul 2012 16:27:54 +0000 (+0200) Subject: Fix compilation under Windows X-Git-Tag: v3.3.0b2~242 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44b4b6a9a584dcf2c9a968e66ef5c03558ca503d;p=python Fix compilation under Windows --- 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; }