Use _PyObject_CallNoArg()

Replace:
    PyObject_CallFunctionObjArgs(callable, NULL)
with:
    _PyObject_CallNoArg(callable)
This commit is contained in:
Victor Stinner 2016-12-06 18:46:19 +01:00
parent a5ed5f000a
commit f17c3de263
15 changed files with 21 additions and 21 deletions

View file

@ -596,7 +596,7 @@ PyObject_Bytes(PyObject *v)
func = _PyObject_LookupSpecial(v, &PyId___bytes__);
if (func != NULL) {
result = PyObject_CallFunctionObjArgs(func, NULL);
result = _PyObject_CallNoArg(func);
Py_DECREF(func);
if (result == NULL)
return NULL;
@ -1314,7 +1314,7 @@ _dir_object(PyObject *obj)
return NULL;
}
/* use __dir__ */
result = PyObject_CallFunctionObjArgs(dirfunc, NULL);
result = _PyObject_CallNoArg(dirfunc);
Py_DECREF(dirfunc);
if (result == NULL)
return NULL;