Fix UBSan error in _testcapi: correct create_attr_from_spec signature (#143097)

Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
Shamil 2026-01-17 21:05:09 +03:00 committed by GitHub
parent f7fceed79c
commit 7ca9e7ad05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,7 +178,7 @@ module_from_slots_exec(PyObject *self, PyObject *spec)
}
static PyObject *
create_attr_from_spec(PyObject *spec, PyObject *def)
create_attr_from_spec(PyObject *spec, PyModuleDef *def)
{
assert(!def);
return PyObject_GetAttrString(spec, "_gimme_this");