| commit | c82729e44f2935f72b5cd0e7eb36a87558459663 | [log] [tgz] |
|---|---|---|
| author | Victor Stinner <victor.stinner@gmail.com> | Thu Nov 14 01:21:00 2013 +0100 |
| committer | Victor Stinner <victor.stinner@gmail.com> | Thu Nov 14 01:21:00 2013 +0100 |
| tree | be8e3f4dca4081604edb65d522f2c7e450ddb251 | |
| parent | 507eabdf11d34cd95cbe44ba876af0a414d7f597 [diff] |
Issue #19437: Fix fold_unaryops_on_constants() of the peephole optimizer, clear the exception when PyList_Append() fails
diff --git a/Python/peephole.c b/Python/peephole.c index a49790a..4185462 100644 --- a/Python/peephole.c +++ b/Python/peephole.c
@@ -275,6 +275,7 @@ len_consts = PyList_GET_SIZE(consts); if (PyList_Append(consts, newconst)) { Py_DECREF(newconst); + PyErr_Clear(); return 0; } Py_DECREF(newconst);