bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858)
This commit is contained in:
committed by
Petr Viktorin
parent
47fbc4e45b
commit
a8b27e623d
@@ -184,7 +184,7 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs)
|
||||
/* 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;
|
||||
|
||||
Reference in New Issue
Block a user