]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141553: Fix incorrect function signatures in `_testmultiphase` (#141554)
authorShamil <ashm.tech@proton.me>
Sat, 15 Nov 2025 17:46:54 +0000 (20:46 +0300)
committerGitHub <noreply@github.com>
Sat, 15 Nov 2025 17:46:54 +0000 (18:46 +0100)
Modules/_testmultiphase.c

index 220fa888e49a5275d517ac85d05c0e889257b450..cd2d7b6559827789e32609ce0fce1916da5aca58 100644 (file)
@@ -1061,7 +1061,7 @@ PyModInit__test_from_modexport_exception(void)
 }
 
 static PyObject *
-modexport_create_string(PyObject *spec, PyObject *def)
+modexport_create_string(PyObject *spec, PyModuleDef *def)
 {
     assert(def == NULL);
     return PyUnicode_FromString("is this \xf0\x9f\xa6\x8b... a module?");
@@ -1138,8 +1138,9 @@ modexport_get_empty_slots(PyObject *mod, PyObject *arg)
 }
 
 static void
-modexport_smoke_free(PyObject *mod)
+modexport_smoke_free(void *op)
 {
+    PyObject *mod = (PyObject *)op;
     int *state = PyModule_GetState(mod);
     if (!state) {
         PyErr_FormatUnraisable("Exception ignored in module %R free", mod);