[Python-checkins] cpython: Fix compilation with C89 compilers (Windows...)

amaury.forgeotdarc python-checkins at python.org
Fri Jan 13 21:11:10 CET 2012


http://hg.python.org/cpython/rev/fbb38a476713
changeset:   74367:fbb38a476713
user:        Amaury Forgeot d'Arc <amauryfa at gmail.com>
date:        Fri Jan 13 21:08:49 2012 +0100
summary:
  Fix compilation with C89 compilers (Windows...)

files:
  Python/ceval.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list