ruby-changes:46927
From: ko1 <ko1@a...>
Date: Thu, 8 Jun 2017 13:06:12 +0900 (JST)
Subject: [ruby-changes:46927] ko1:r59042 (trunk): use NULL instead of 0.
ko1 2017-06-08 13:06:07 +0900 (Thu, 08 Jun 2017) New Revision: 59042 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59042 Log: use NULL instead of 0. * compile.c: use NULL instead of 0 for ADD_CATCH_ENTRY() to specify don't pass iseq. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 59041) +++ compile.c (revision 59042) @@ -593,8 +593,8 @@ rb_iseq_compile_node(rb_iseq_t *iseq, NO https://github.com/ruby/ruby/blob/trunk/compile.c#L593 ADD_TRACE(ret, nd_line(node), RUBY_EVENT_B_RETURN); /* wide range catch handler must put at last */ - ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, 0, start); - ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, start, end, 0, end); + ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, NULL, start); + ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, start, end, NULL, end); break; } case ISEQ_TYPE_CLASS: @@ -4357,12 +4357,9 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/compile.c#L4357 ADD_INSN(ret, line, pop); } - ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, redo_label, break_label, - 0, break_label); - ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, redo_label, break_label, 0, - next_catch_label); - ADD_CATCH_ENTRY(CATCH_TYPE_REDO, redo_label, break_label, 0, - ISEQ_COMPILE_DATA(iseq)->redo_label); + ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, redo_label, break_label, NULL, break_label); + ADD_CATCH_ENTRY(CATCH_TYPE_NEXT, redo_label, break_label, NULL, next_catch_label); + ADD_CATCH_ENTRY(CATCH_TYPE_REDO, redo_label, break_label, NULL, ISEQ_COMPILE_DATA(iseq)->redo_label); ISEQ_COMPILE_DATA(iseq)->start_label = prev_start_label; ISEQ_COMPILE_DATA(iseq)->end_label = prev_end_label; @@ -4424,7 +4421,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/compile.c#L4421 ISEQ_COMPILE_DATA(iseq)->current_block = prevblock; - ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, retry_label, retry_end_l, 0, retry_end_l); + ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, retry_label, retry_end_l, NULL, retry_end_l); break; } @@ -4678,7 +4675,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK https://github.com/ruby/ruby/blob/trunk/compile.c#L4675 /* register catch entry */ ADD_CATCH_ENTRY(CATCH_TYPE_RESCUE, lstart, lend, rescue, lcont); - ADD_CATCH_ENTRY(CATCH_TYPE_RETRY, lend, lcont, 0, lstart); + ADD_CATCH_ENTRY(CATCH_TYPE_RETRY, lend, lcont, NULL, lstart); break; } case NODE_RESBODY:{ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/