]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix UBSan error in _testcapi: correct create_attr_from_spec signature (#143097)
authorShamil <ashm.tech@proton.me>
Sat, 17 Jan 2026 18:05:09 +0000 (21:05 +0300)
committerGitHub <noreply@github.com>
Sat, 17 Jan 2026 18:05:09 +0000 (18:05 +0000)
Co-authored-by: sobolevn <mail@sobolevn.me>
Modules/_testcapi/module.c

index 7b5861bc08ed7741e8f23a8ffad1d8144727d598..ef657842e7749420dd05013d63f07e4154b1a260 100644 (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");