summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 14:42:08 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit3cae73133cfec7d5ec3f8058ec647d5163578003 (patch)
tree8ec4433a4b4bf1063424dc7e4be76afbc79255c0
parentb8fd2e83e7b18fe3c70fc342388b1cb054b22e42 (diff)
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.
-rw-r--r--ext/openssl/ossl_ssl.c2
-rw-r--r--include/ruby/ruby.h2
-rw-r--r--vm_eval.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index f25dc959b1..587ca2473f 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -592,7 +592,7 @@ ssl_renegotiation_cb(const SSL *ssl)
#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 cf065e974e..1f05dd4dc6 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1964,7 +1964,7 @@ VALUE rb_yield_splat(VALUE);
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 b449cd4996..2670c2caab 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1193,7 +1193,7 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1,
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,