]> granicus.if.org Git - python/commitdiff
and another one
authorChristian Heimes <christian@cheimes.de>
Sat, 6 Oct 2012 15:16:39 +0000 (17:16 +0200)
committerChristian Heimes <christian@cheimes.de>
Sat, 6 Oct 2012 15:16:39 +0000 (17:16 +0200)
Objects/abstract.c

index eb3a766c1995ab2b995f1bd169580be5ff16e3ad..84e827ad8cd66c75b27ebc5df649733be5859b79 100644 (file)
@@ -78,7 +78,7 @@ _PyObject_HasLen(PyObject *o) {
 Py_ssize_t
 PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
 {
-    PyObject *hint;
+    PyObject *hint, *result;
     Py_ssize_t res;
     _Py_IDENTIFIER(__length_hint__);
     res = PyObject_Length(o);
@@ -98,7 +98,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
         }
         return defaultvalue;
     }
-    PyObject *result = PyObject_CallFunctionObjArgs(hint, NULL);
+    result = PyObject_CallFunctionObjArgs(hint, NULL);
     Py_DECREF(hint);
     if (result == NULL) {
         if (PyErr_ExceptionMatches(PyExc_TypeError)) {