From a5ed5f000aad67d216201d959de4c70b7575309d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Dec 2016 18:45:50 +0100 Subject: Use _PyObject_CallNoArg() Replace: PyObject_CallObject(callable, NULL) with: _PyObject_CallNoArg(callable) --- Python/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 8b17c09ca16..8420aec3b95 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); -- cgit v1.2.3