Skip to content

Commit c7cb7f3

Browse files
committed
Fix function pointer type
1 parent aae4ad7 commit c7cb7f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_threadmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,9 @@ ThreadHandle_start(ThreadHandle *self, PyObject *func, PyObject *args,
453453
}
454454

455455
static int
456-
join_thread(ThreadHandle *handle)
456+
join_thread(void *arg)
457457
{
458+
ThreadHandle *handle = (ThreadHandle*)arg;
458459
assert(get_thread_handle_state(handle) == THREAD_HANDLE_RUNNING);
459460
PyThread_handle_t os_handle;
460461
if (ThreadHandle_get_os_handle(handle, &os_handle)) {
@@ -528,8 +529,7 @@ ThreadHandle_join(ThreadHandle *self, PyTime_t timeout_ns)
528529
}
529530
}
530531

531-
if (_PyOnceFlag_CallOnce(&self->once, (_Py_once_fn_t *)join_thread,
532-
self) == -1) {
532+
if (_PyOnceFlag_CallOnce(&self->once, join_thread, self) == -1) {
533533
return -1;
534534
}
535535
assert(get_thread_handle_state(self) == THREAD_HANDLE_DONE);

0 commit comments

Comments
 (0)