Backed out changeset b9c9691c72c5

Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
This commit is contained in:
Victor Stinner 2016-12-04 22:59:09 +01:00
parent c8d03187ff
commit de4ae3d486
33 changed files with 83 additions and 71 deletions

View file

@ -103,7 +103,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
}
return defaultvalue;
}
result = _PyObject_CallNoArg(hint);
result = PyObject_CallFunctionObjArgs(hint, NULL);
Py_DECREF(hint);
if (result == NULL) {
if (PyErr_ExceptionMatches(PyExc_TypeError)) {
@ -716,7 +716,7 @@ PyObject_Format(PyObject *obj, PyObject *format_spec)
}
/* And call it. */
result = _PyObject_CallArg1(meth, format_spec);
result = PyObject_CallFunctionObjArgs(meth, format_spec, NULL);
Py_DECREF(meth);
if (result && !PyUnicode_Check(result)) {
@ -3011,7 +3011,7 @@ PyObject_IsInstance(PyObject *inst, PyObject *cls)
Py_DECREF(checker);
return ok;
}
res = _PyObject_CallArg1(checker, inst);
res = PyObject_CallFunctionObjArgs(checker, inst, NULL);
Py_LeaveRecursiveCall();
Py_DECREF(checker);
if (res != NULL) {
@ -3085,7 +3085,7 @@ PyObject_IsSubclass(PyObject *derived, PyObject *cls)
Py_DECREF(checker);
return ok;
}
res = _PyObject_CallArg1(checker, derived);
res = PyObject_CallFunctionObjArgs(checker, derived, NULL);
Py_LeaveRecursiveCall();
Py_DECREF(checker);
if (res != NULL) {