From: Guido van Rossum Date: Thu, 14 May 1998 01:49:48 +0000 (+0000) Subject: Since PyDict_GetItem() can't raise an exception any more, there's no X-Git-Tag: v1.5.2a1~646 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e23eb57f08aa3f2f379757ed3d97fbf3188a1704;p=thirdparty%2FPython%2Fcpython.git Since PyDict_GetItem() can't raise an exception any more, there's no need to cxall PyErr_Clear() when it returns NULL. --- diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 0b9604ae71ce..a98d68e025af 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -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;