ruby-changes:57318
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 27 Aug 2019 16:48:42 +0900 (JST)
Subject: [ruby-changes:57318] 卜部昌平: 19b6678132 (master): rb_uninterruptible now free from ANYARGS
https://git.ruby-lang.org/ruby.git/commit/?id=19b6678132 From 19b6678132acc56460432d8c2d6246f399b27160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Tue, 27 Aug 2019 12:40:06 +0900 Subject: rb_uninterruptible now free from ANYARGS After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This function has only one call site so adding appropriate prototype is trivial. diff --git a/internal.h b/internal.h index 7d6bf1e..5a846c1 100644 --- a/internal.h +++ b/internal.h @@ -2215,7 +2215,7 @@ VALUE rb_thread_shield_release(VALUE self); https://github.com/ruby/ruby/blob/trunk/internal.h#L2215 VALUE rb_thread_shield_destroy(VALUE self); int rb_thread_to_be_killed(VALUE thread); void rb_mutex_allow_trap(VALUE self, int val); -VALUE rb_uninterruptible(VALUE (*b_proc)(ANYARGS), VALUE data); +VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data); VALUE rb_mutex_owned_p(VALUE self); /* transcode.c */ diff --git a/thread.c b/thread.c index 57ccfef..752b8b0 100644 --- a/thread.c +++ b/thread.c @@ -5507,7 +5507,7 @@ rb_default_coverage(int n) https://github.com/ruby/ruby/blob/trunk/thread.c#L5507 } VALUE -rb_uninterruptible(VALUE (*b_proc)(ANYARGS), VALUE data) +rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data) { VALUE interrupt_mask = rb_ident_hash_new(); rb_thread_t *cur_th = GET_THREAD(); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/