From 115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 7 Feb 2020 14:14:05 +0900 Subject: more on NULL versus functions. Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48 --- thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index ee73f36..f5efe40 100644 --- a/thread.c +++ b/thread.c @@ -488,7 +488,7 @@ static void unblock_function_clear(rb_thread_t *th) { rb_native_mutex_lock(&th->interrupt_lock); - th->unblock.func = NULL; + th->unblock.func = 0; rb_native_mutex_unlock(&th->interrupt_lock); } @@ -961,7 +961,7 @@ thread_initialize(VALUE thread, VALUE args) } } else { - return thread_create_core(thread, args, NULL); + return thread_create_core(thread, args, 0); } } @@ -4582,7 +4582,7 @@ thgroup_memsize(const void *ptr) static const rb_data_type_t thgroup_data_type = { "thgroup", - {NULL, RUBY_TYPED_DEFAULT_FREE, thgroup_memsize,}, + {0, RUBY_TYPED_DEFAULT_FREE, thgroup_memsize,}, 0, 0, RUBY_TYPED_FREE_IMMEDIATELY }; -- cgit v1.1