diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-05 09:45:03 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-05 09:45:03 +0000 |
commit | e5614fbcb05b1f9e6dbd8fd70848c834105f6a40 (patch) | |
tree | 2d60007753fb267ed925131292ef82b7b99f7974 /iseq.c | |
parent | f9c614c66880bf5435d5c877f96dd9ed10689376 (diff) |
iseq.c (iseq_load, iseq_data_to_ary): Fix a type error (for clang)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -617,10 +617,10 @@ iseq_load(VALUE data, const rb_iseq_t *parent, VALUE opt) code_range = rb_hash_aref(misc, ID2SYM(rb_intern("code_range"))); if (RB_TYPE_P(code_range, T_ARRAY) && RARRAY_LEN(code_range) == 4) { - tmp_loc.first_loc.lineno = NUM2LONG(rb_ary_entry(code_range, 0)); - tmp_loc.first_loc.column = NUM2LONG(rb_ary_entry(code_range, 1)); - tmp_loc.last_loc.lineno = NUM2LONG(rb_ary_entry(code_range, 2)); - tmp_loc.last_loc.column = NUM2LONG(rb_ary_entry(code_range, 3)); + tmp_loc.first_loc.lineno = NUM2INT(rb_ary_entry(code_range, 0)); + tmp_loc.first_loc.column = NUM2INT(rb_ary_entry(code_range, 1)); + tmp_loc.last_loc.lineno = NUM2INT(rb_ary_entry(code_range, 2)); + tmp_loc.last_loc.column = NUM2INT(rb_ary_entry(code_range, 3)); } make_compile_option(&option, opt); @@ -2182,10 +2182,10 @@ iseq_data_to_ary(const rb_iseq_t *iseq) rb_hash_aset(misc, ID2SYM(rb_intern("stack_max")), INT2FIX(iseq->body->stack_max)); rb_hash_aset(misc, ID2SYM(rb_intern("code_range")), rb_ary_new_from_args(4, - LONG2FIX(iseq->body->location.code_range.first_loc.lineno), - LONG2FIX(iseq->body->location.code_range.first_loc.column), - LONG2FIX(iseq->body->location.code_range.last_loc.lineno), - LONG2FIX(iseq->body->location.code_range.last_loc.column))); + INT2FIX(iseq->body->location.code_range.first_loc.lineno), + INT2FIX(iseq->body->location.code_range.first_loc.column), + INT2FIX(iseq->body->location.code_range.last_loc.lineno), + INT2FIX(iseq->body->location.code_range.last_loc.column))); /* * [:magic, :major_version, :minor_version, :format_type, :misc, |