Skip to content

Commit cc56d32

Browse files
markshannonjdemeyer
authored andcommitted
bpo-37207: enable vectorcall for type.__call__
1 parent 7f41c8e commit cc56d32

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Objects/typeobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3614,7 +3614,7 @@ PyTypeObject PyType_Type = {
36143614
sizeof(PyHeapTypeObject), /* tp_basicsize */
36153615
sizeof(PyMemberDef), /* tp_itemsize */
36163616
(destructor)type_dealloc, /* tp_dealloc */
3617-
0, /* tp_vectorcall_offset */
3617+
offsetof(PyTypeObject, tp_vectorcall), /* tp_vectorcall_offset */
36183618
0, /* tp_getattr */
36193619
0, /* tp_setattr */
36203620
0, /* tp_as_async */
@@ -3629,7 +3629,8 @@ PyTypeObject PyType_Type = {
36293629
(setattrofunc)type_setattro, /* tp_setattro */
36303630
0, /* tp_as_buffer */
36313631
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
3632-
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS, /* tp_flags */
3632+
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_TYPE_SUBCLASS |
3633+
_Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */
36333634
type_doc, /* tp_doc */
36343635
(traverseproc)type_traverse, /* tp_traverse */
36353636
(inquiry)type_clear, /* tp_clear */

0 commit comments

Comments
 (0)