gh-132399: fix invalid function signatures on the free-threaded build (#132400)

This commit is contained in:
Bénédikt Tran 2025-04-12 09:46:33 +02:00 committed by GitHub
parent 292a7248cd
commit a81232c769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 10 deletions

View file

@ -2996,8 +2996,9 @@ is_bytecode_unused(_PyCodeArray *tlbc, Py_ssize_t idx,
}
static int
get_code_with_unused_tlbc(PyObject *obj, struct get_code_args *args)
get_code_with_unused_tlbc(PyObject *obj, void *data)
{
struct get_code_args *args = (struct get_code_args *) data;
if (!PyCode_Check(obj)) {
return 1;
}
@ -3046,7 +3047,7 @@ _Py_ClearUnusedTLBC(PyInterpreterState *interp)
}
// Collect code objects that have bytecode not in use by any thread
_PyGC_VisitObjectsWorldStopped(
interp, (gcvisitobjects_t)get_code_with_unused_tlbc, &args);
interp, get_code_with_unused_tlbc, &args);
if (args.err < 0) {
goto err;
}