Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 78052:2ecdda96f970
Fix compilation under Windows
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Tue, 10 Jul 2012 18:27:54 +0200 |
| parents | 3fa1414ce505 |
| children | 9e164b404983 |
line wrap: on
line diff
--- a/Python/import.c Tue Jul 10 10:05:00 2012 -0400 +++ b/Python/import.c Tue Jul 10 18:27:54 2012 +0200 @@ -426,12 +426,13 @@ 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; }
