ruby-changes:73729
From: Samuel <ko1@a...>
Date: Sun, 25 Sep 2022 20:41:43 +0900 (JST)
Subject: [ruby-changes:73729] 85cc0ce5c8 (master): Use `int first_lineno` for binary format.
https://git.ruby-lang.org/ruby.git/commit/?id=85cc0ce5c8 From 85cc0ce5c8b6a369d439093453f7b87f1a154efb Mon Sep 17 00:00:00 2001 From: Samuel Williams <samuel.williams@o...> Date: Sun, 25 Sep 2022 21:49:45 +1300 Subject: Use `int first_lineno` for binary format. --- compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile.c b/compile.c index d9a17560be..cf2ddea5e2 100644 --- a/compile.c +++ b/compile.c @@ -12024,7 +12024,7 @@ ibf_dump_iseq_each(struct ibf_dump *dump, const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/compile.c#L12024 ibf_dump_write_small_value(dump, location_pathobj_index); ibf_dump_write_small_value(dump, location_base_label_index); ibf_dump_write_small_value(dump, location_label_index); - ibf_dump_write_small_value(dump, RB_INT2NUM(body->location.first_lineno)); + ibf_dump_write_small_value(dump, body->location.first_lineno); ibf_dump_write_small_value(dump, body->location.node_id); ibf_dump_write_small_value(dump, body->location.code_location.beg_pos.lineno); ibf_dump_write_small_value(dump, body->location.code_location.beg_pos.column); @@ -12135,7 +12135,7 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset) https://github.com/ruby/ruby/blob/trunk/compile.c#L12135 const VALUE location_pathobj_index = ibf_load_small_value(load, &reading_pos); const VALUE location_base_label_index = ibf_load_small_value(load, &reading_pos); const VALUE location_label_index = ibf_load_small_value(load, &reading_pos); - const VALUE location_first_lineno = ibf_load_small_value(load, &reading_pos); + const int location_first_lineno = (int)ibf_load_small_value(load, &reading_pos); const int location_node_id = (int)ibf_load_small_value(load, &reading_pos); const int location_code_location_beg_pos_lineno = (int)ibf_load_small_value(load, &reading_pos); const int location_code_location_beg_pos_column = (int)ibf_load_small_value(load, &reading_pos); @@ -12195,7 +12195,7 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset) https://github.com/ruby/ruby/blob/trunk/compile.c#L12195 load_body->variable.flip_count = variable_flip_count; load_body->variable.script_lines = Qnil; - load_body->location.first_lineno = RB_NUM2INT(location_first_lineno); + load_body->location.first_lineno = location_first_lineno; load_body->location.node_id = location_node_id; load_body->location.code_location.beg_pos.lineno = location_code_location_beg_pos_lineno; load_body->location.code_location.beg_pos.column = location_code_location_beg_pos_column; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/