gh-111178: fix UBSan failures for TaskStepMethWrapper (#131602)

This commit is contained in:
Bénédikt Tran 2025-03-23 15:26:03 +01:00 committed by GitHub
parent 5fc889ffbf
commit ef06508f8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2121,8 +2121,9 @@ TaskStepMethWrapper_traverse(PyObject *op,
}
static PyObject *
TaskStepMethWrapper_get___self__(TaskStepMethWrapper *o, void *Py_UNUSED(ignored))
TaskStepMethWrapper_get___self__(PyObject *op, void *Py_UNUSED(closure))
{
TaskStepMethWrapper *o = (TaskStepMethWrapper*)op;
if (o->sw_task) {
return Py_NewRef(o->sw_task);
}
@ -2130,7 +2131,7 @@ TaskStepMethWrapper_get___self__(TaskStepMethWrapper *o, void *Py_UNUSED(ignored
}
static PyGetSetDef TaskStepMethWrapper_getsetlist[] = {
{"__self__", (getter)TaskStepMethWrapper_get___self__, NULL, NULL},
{"__self__", TaskStepMethWrapper_get___self__, NULL, NULL},
{NULL} /* Sentinel */
};