bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)
(cherry picked from commit a8b27e623d75377aabe50df27e97cab4e81a174a)
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
diff --git a/Objects/call.c b/Objects/call.c
index 578e1b3..1f41f5c 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -176,7 +176,7 @@
/* get vectorcallfunc as in _PyVectorcall_Function, but without
* the _Py_TPFLAGS_HAVE_VECTORCALL check */
Py_ssize_t offset = Py_TYPE(callable)->tp_vectorcall_offset;
- if ((offset <= 0) || (!Py_TYPE(callable)->tp_call)) {
+ if (offset <= 0) {
PyErr_Format(PyExc_TypeError, "'%.200s' object does not support vectorcall",
Py_TYPE(callable)->tp_name);
return NULL;