Skip to content
Merged
Next Next commit
don't wrap base PyCFunction slots on class creation if not overridden
  • Loading branch information
tom-pytel committed Apr 9, 2025
commit 2067587bfddf7b5102b8403a0cf1e8c944798f27
8 changes: 8 additions & 0 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -11183,6 +11183,14 @@ update_one_slot(PyTypeObject *type, pytype_slotdef *p)
}
else {
use_generic = 1;
// if (generic == NULL && Py_IS_TYPE(descr, &PyMethodDescr_Type) &&
// *ptr == ((PyMethodDescrObject *)descr)->d_method->ml_meth)
// {
// generic = *ptr;
// }
// else {
// generic = p->function;
// }
generic = p->function;
if (p->function == slot_tp_call) {
/* A generic __call__ is incompatible with vectorcall */
Expand Down