]> granicus.if.org Git - python/commitdiff
Since PyDict_GetItem() can't raise an exception any more, there's no
authorGuido van Rossum <guido@python.org>
Thu, 14 May 1998 01:49:48 +0000 (01:49 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 14 May 1998 01:49:48 +0000 (01:49 +0000)
need to cxall PyErr_Clear() when it returns NULL.

Objects/frameobject.c

index 0b9604ae71ce0b525d19e55d035033f618aad5d2..a98d68e025af62e6734d5c40eb7413f91b1ec00a 100644 (file)
@@ -356,10 +356,7 @@ PyFrame_LocalsToFast(f, clear)
        for (; --j >= 0; ) {
                PyObject *key = PyTuple_GetItem(map, j);
                PyObject *value = PyDict_GetItem(locals, key);
-               if (value == NULL)
-                       PyErr_Clear();
-               else
-                       Py_INCREF(value);
+               Py_XINCREF(value);
                if (value != NULL || clear) {
                        Py_XDECREF(fast[j]);
                        fast[j] = value;