Use _PyObject_CallNoArg()

Replace:
    PyObject_CallObject(callable, NULL)
with:
    _PyObject_CallNoArg(callable)
This commit is contained in:
Victor Stinner 2016-12-06 18:45:50 +01:00
parent 2a358f862b
commit a5ed5f000a
11 changed files with 33 additions and 33 deletions

View file

@ -4198,7 +4198,7 @@ do_raise(PyObject *exc, PyObject *cause)
if (PyExceptionClass_Check(exc)) {
type = exc;
value = PyObject_CallObject(exc, NULL);
value = _PyObject_CallNoArg(exc);
if (value == NULL)
goto raise_error;
if (!PyExceptionInstance_Check(value)) {
@ -4229,7 +4229,7 @@ do_raise(PyObject *exc, PyObject *cause)
if (cause) {
PyObject *fixed_cause;
if (PyExceptionClass_Check(cause)) {
fixed_cause = PyObject_CallObject(cause, NULL);
fixed_cause = _PyObject_CallNoArg(cause);
if (fixed_cause == NULL)
goto raise_error;
Py_DECREF(cause);