]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111178: Fix function signature for test_threading (#131663)
authorVictor Stinner <vstinner@python.org>
Mon, 24 Mar 2025 13:56:45 +0000 (14:56 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Mar 2025 13:56:45 +0000 (13:56 +0000)
Modules/_threadmodule.c

index bcac2b48f18457be0a2374b58675546209c6d36e..f4c98ca39f6ee6305a7904c68aa346a8000d3033 100644 (file)
@@ -384,8 +384,9 @@ exit:
 }
 
 static int
-force_done(ThreadHandle *handle)
+force_done(void *arg)
 {
+    ThreadHandle *handle = (ThreadHandle *)arg;
     assert(get_thread_handle_state(handle) == THREAD_HANDLE_STARTING);
     _PyEvent_Notify(&handle->thread_is_exiting);
     set_thread_handle_state(handle, THREAD_HANDLE_DONE);
@@ -458,7 +459,7 @@ ThreadHandle_start(ThreadHandle *self, PyObject *func, PyObject *args,
     return 0;
 
 start_failed:
-    _PyOnceFlag_CallOnce(&self->once, (_Py_once_fn_t *)force_done, self);
+    _PyOnceFlag_CallOnce(&self->once, force_done, self);
     return -1;
 }