Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 74367:fbb38a476713
Fix compilation with C89 compilers (Windows...)
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> |
|---|---|
| date | Fri, 13 Jan 2012 21:08:49 +0100 |
| parents | 315781cd72fa |
| children | 7d96679c5d46 |
line wrap: on
line diff
--- a/Python/ceval.c Fri Jan 13 21:06:12 2012 +0100 +++ b/Python/ceval.c Fri Jan 13 21:08:49 2012 +0100 @@ -1837,6 +1837,7 @@ /* x is now the iterator, make the first next() call */ retval = (*Py_TYPE(x)->tp_iternext)(x); if (!retval) { + PyObject *et, *ev, *tb; /* iter may be exhausted */ Py_CLEAR(x); if (PyErr_Occurred() && @@ -1845,7 +1846,6 @@ break; } /* try to get return value from exception */ - PyObject *et, *ev, *tb; PyErr_Fetch(&et, &ev, &tb); Py_XDECREF(et); Py_XDECREF(tb);
