Skip to content

Commit 78f1bac

Browse files
authored
gh-111178: Fix function signature for test_threading (#131663)
1 parent da6730c commit 78f1bac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/_threadmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,9 @@ thread_run(void *boot_raw)
384384
}
385385

386386
static int
387-
force_done(ThreadHandle *handle)
387+
force_done(void *arg)
388388
{
389+
ThreadHandle *handle = (ThreadHandle *)arg;
389390
assert(get_thread_handle_state(handle) == THREAD_HANDLE_STARTING);
390391
_PyEvent_Notify(&handle->thread_is_exiting);
391392
set_thread_handle_state(handle, THREAD_HANDLE_DONE);
@@ -458,7 +459,7 @@ ThreadHandle_start(ThreadHandle *self, PyObject *func, PyObject *args,
458459
return 0;
459460

460461
start_failed:
461-
_PyOnceFlag_CallOnce(&self->once, (_Py_once_fn_t *)force_done, self);
462+
_PyOnceFlag_CallOnce(&self->once, force_done, self);
462463
return -1;
463464
}
464465

0 commit comments

Comments
 (0)