From af5e2566405e4808a6d0a29c5b7d305d6fc0aada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 26 Aug 2019 15:27:48 +0900 Subject: rb_catch now free from ANYARGS After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_catch, and fixes some bugs revealed by that. --- ext/racc/cparse/cparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/racc') diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index cc0e8659be..ca74b80000 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -212,7 +212,7 @@ static void extract_user_token _((struct cparse_params *v, VALUE block_args, VALUE *tok, VALUE *val)); static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val)); static int reduce _((struct cparse_params* v, long act)); -static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); +static rb_block_call_func reduce0; #ifdef DEBUG # define D_puts(msg) if (v->sys_debug) puts(msg) @@ -708,7 +708,7 @@ reduce(struct cparse_params *v, long act) } static VALUE -reduce0(VALUE val, VALUE data, VALUE self) +reduce0(RB_BLOCK_CALL_FUNC_ARGLIST(_, data)) { struct cparse_params *v = rb_check_typeddata(data, &cparse_params_type); VALUE reduce_to, reduce_len, method_id; -- cgit v1.2.3