cpython: 9e59cb403efa (original) (raw)
Mercurial > cpython
changeset 104098:9e59cb403efa
Issue #27703: Got rid of unnecessary NULL checks in do_raise() in release mode. Patch by Xiang Zhang. [#27703]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Tue, 27 Sep 2016 11:37:10 +0300 |
parents | f496fb6bf4a0 |
children | 6117d0e1a5c9 |
files | Python/ceval.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Python/ceval.c 7 |
line wrap: on
line diff
--- a/Python/ceval.c +++ b/Python/ceval.c @@ -4245,6 +4245,9 @@ do_raise(PyObject *exc, PyObject *cause) goto raise_error; }
+ if (cause) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { @@ -4271,8 +4274,8 @@ do_raise(PyObject *exc, PyObject cause) PyErr_SetObject(type, value); / PyErr_SetObject incref's its arguments */