aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-04-12 09:46:33 +0200
committerGitHub <noreply@github.com>2025-04-12 07:46:33 +0000
commita81232c769a4f67ee312c5c67a2148c54c6570d0 (patch)
tree77546009626a2c1af2d4a89c7fdcc74c652a6b26 /Objects/codeobject.c
parent292a7248cda89f497e06eff4aa0147d6ff22f6bb (diff)
downloadcpython-a81232c769a4f67ee312c5c67a2148c54c6570d0.tar.gz
cpython-a81232c769a4f67ee312c5c67a2148c54c6570d0.zip
gh-132399: fix invalid function signatures on the free-threaded build (#132400)
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 33505b40a73..226c64f717d 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -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;
}