[前][次][番号順一覧][スレッド一覧]

ruby-changes:71667

From: Nobuyoshi <ko1@a...>
Date: Thu, 7 Apr 2022 19:07:50 +0900 (JST)
Subject: [ruby-changes:71667] 9e58c3c519 (master): Get rid of type aliasing

https://git.ruby-lang.org/ruby.git/commit/?id=9e58c3c519

From 9e58c3c5195f0745ba7f125a3478046c5eb3acd7 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 7 Apr 2022 19:07:24 +0900
Subject: Get rid of type aliasing

---
 spec/ruby/optional/capi/ext/thread_spec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/ruby/optional/capi/ext/thread_spec.c b/spec/ruby/optional/capi/ext/thread_spec.c
index 80e9392488..be812d796f 100644
--- a/spec/ruby/optional/capi/ext/thread_spec.c
+++ b/spec/ruby/optional/capi/ext/thread_spec.c
@@ -159,10 +159,10 @@ static void *new_thread_check(void *args) { https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/thread_spec.c#L159
 static VALUE thread_spec_ruby_native_thread_p_new_thread(VALUE self) {
 #ifndef _WIN32
     pthread_t t;
-    VALUE *result = &true_result;
+    void *result = &true_result;
     pthread_create(&t, NULL, new_thread_check, NULL);
-    pthread_join(t, (void **)&result);
-    return *result;
+    pthread_join(t, &result);
+    return *(VALUE *)result;
 #else
     return Qfalse;
 #endif
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]