ruby-changes:57319
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 27 Aug 2019 17:48:38 +0900 (JST)
Subject: [ruby-changes:57319] 卜部昌平: 3cae73133c (master): rb_iterate now takes rb_block_call_func_t
https://git.ruby-lang.org/ruby.git/commit/?id=3cae73133c From 3cae73133cfec7d5ec3f8058ec647d5163578003 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: Mon, 26 Aug 2019 14:42:08 +0900 Subject: rb_iterate now takes rb_block_call_func_t After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit makes rb_iterate free from ANYARGS. diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index f25dc95..587ca24 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -592,7 +592,7 @@ ssl_renegotiation_cb(const SSL *ssl) https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L592 #if !defined(OPENSSL_NO_NEXTPROTONEG) || \ defined(HAVE_SSL_CTX_SET_ALPN_SELECT_CB) static VALUE -ssl_npn_encode_protocol_i(VALUE cur, VALUE encoded) +ssl_npn_encode_protocol_i(RB_BLOCK_CALL_FUNC_ARGLIST(cur, encoded)) { int len = RSTRING_LENINT(cur); char len_byte; diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index cf065e9..1f05dd4 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1964,7 +1964,7 @@ VALUE rb_yield_splat(VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1964 VALUE rb_yield_block(VALUE, VALUE, int, const VALUE *, VALUE); /* rb_block_call_func */ int rb_block_given_p(void); void rb_need_block(void); -VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE); +VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE); VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE); VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE); VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...); diff --git a/vm_eval.c b/vm_eval.c index b449cd4..2670c2c 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1193,7 +1193,7 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1193 VALUE rb_iterate(VALUE (* it_proc)(VALUE), VALUE data1, - VALUE (* bl_proc)(ANYARGS), VALUE data2) + rb_block_call_func_t bl_proc, VALUE data2) { return rb_iterate0(it_proc, data1, bl_proc ? rb_vm_ifunc_proc_new(bl_proc, (void *)data2) : 0, -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/