diff options
Diffstat (limited to 'Modules/_abc.c')
-rw-r--r-- | Modules/_abc.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/Modules/_abc.c b/Modules/_abc.c index 219ea0d..7b5d418 100644 --- a/Modules/_abc.c +++ b/Modules/_abc.c @@ -480,7 +480,6 @@ _abc__abc_instancecheck_impl(PyObject *module, PyObject *self, /*[clinic end generated code: output=b8b5148f63b6b56f input=a4f4525679261084]*/ { PyObject *subtype, *result = NULL, *subclass = NULL; - PyObject *margs[2]; _abc_data *impl = _get_impl(self); if (impl == NULL) { return NULL; @@ -515,16 +514,12 @@ _abc__abc_instancecheck_impl(PyObject *module, PyObject *self, } } /* Fall back to the subclass check. */ - margs[0] = self; - margs[1] = subclass; - result = _PyObject_VectorcallMethodId(&PyId___subclasscheck__, margs, - 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); + result = _PyObject_CallMethodIdOneArg(self, &PyId___subclasscheck__, + subclass); goto end; } - margs[0] = self; - margs[1] = subclass; - result = _PyObject_VectorcallMethodId(&PyId___subclasscheck__, margs, - 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); + result = _PyObject_CallMethodIdOneArg(self, &PyId___subclasscheck__, + subclass); if (result == NULL) { goto end; } @@ -536,10 +531,8 @@ _abc__abc_instancecheck_impl(PyObject *module, PyObject *self, break; case 0: Py_DECREF(result); - margs[0] = self; - margs[1] = subtype; - result = _PyObject_VectorcallMethodId(&PyId___subclasscheck__, margs, - 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); + result = _PyObject_CallMethodIdOneArg(self, &PyId___subclasscheck__, + subtype); break; case 1: // Nothing to do. break; @@ -620,8 +613,8 @@ _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self, } /* 3. Check the subclass hook. */ - ok = _PyObject_CallMethodIdObjArgs((PyObject *)self, &PyId___subclasshook__, - subclass, NULL); + ok = _PyObject_CallMethodIdOneArg((PyObject *)self, &PyId___subclasshook__, + subclass); if (ok == NULL) { goto end; } |