mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use _PyObject_CallNoArg()
Replace: PyObject_CallObject(callable, NULL) with: _PyObject_CallNoArg(callable)
This commit is contained in:
parent
2a358f862b
commit
a5ed5f000a
11 changed files with 33 additions and 33 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue