diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-10 18:27:54 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-10 18:27:54 +0200 |
| commit | bc5266671e1879adb2d293a7a0179a37db8c092b (patch) | |
| tree | efebd81df4572a60eb7bf0a2f1934c4bfc0c2f33 /Python/import.c | |
| parent | ca68d48bed5fd51e23582923647b5883a2d56c7d (diff) | |
| download | cpython-bc5266671e1879adb2d293a7a0179a37db8c092b.tar.gz | |
Fix compilation under Windows
Diffstat (limited to 'Python/import.c')
| -rw-r--r-- | Python/import.c | 3 |
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; } |
