(original) (raw)
changeset: 104098:9e59cb403efa parent: 104096:f496fb6bf4a0 user: Serhiy Storchaka storchaka@gmail.com date: Tue Sep 27 11:37:10 2016 +0300 files: Python/ceval.c description: Issue #27703: Got rid of unnecessary NULL checks in do_raise() in release mode. Patch by Xiang Zhang. diff -r f496fb6bf4a0 -r 9e59cb403efa Python/ceval.c --- a/Python/ceval.c Tue Sep 27 05:26:49 2016 +0000 +++ b/Python/ceval.c Tue Sep 27 11:37:10 2016 +0300 @@ -4245,6 +4245,9 @@ goto raise_error; } + assert(type != NULL); + assert(value != NULL); + if (cause) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { @@ -4271,8 +4274,8 @@ PyErr_SetObject(type, value); /* PyErr_SetObject incref's its arguments */ - Py_XDECREF(value); - Py_XDECREF(type); + Py_DECREF(value); + Py_DECREF(type); return 0; raise_error: /storchaka@gmail.com