summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-14 01:49:48 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-14 01:49:48 (GMT)
commite23eb57f08aa3f2f379757ed3d97fbf3188a1704 (patch)
tree1ea0e749cfb84d7ddb95491e5fa53077b5453cb9 /Objects
parent474b19e2abc71c3ae0afd5e7a11006cf40b9c047 (diff)
downloadcpython-e23eb57f08aa3f2f379757ed3d97fbf3188a1704.zip
cpython-e23eb57f08aa3f2f379757ed3d97fbf3188a1704.tar.gz
cpython-e23eb57f08aa3f2f379757ed3d97fbf3188a1704.tar.bz2
Since PyDict_GetItem() can't raise an exception any more, there's no
need to cxall PyErr_Clear() when it returns NULL.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 0b9604a..a98d68e 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;