mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
f9c614c668
commit
e5614fbcb0
1 changed files with 8 additions and 8 deletions
16
iseq.c
16
iseq.c
|
@ -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")));
|
code_range = rb_hash_aref(misc, ID2SYM(rb_intern("code_range")));
|
||||||
if (RB_TYPE_P(code_range, T_ARRAY) && RARRAY_LEN(code_range) == 4) {
|
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.lineno = NUM2INT(rb_ary_entry(code_range, 0));
|
||||||
tmp_loc.first_loc.column = NUM2LONG(rb_ary_entry(code_range, 1));
|
tmp_loc.first_loc.column = NUM2INT(rb_ary_entry(code_range, 1));
|
||||||
tmp_loc.last_loc.lineno = NUM2LONG(rb_ary_entry(code_range, 2));
|
tmp_loc.last_loc.lineno = NUM2INT(rb_ary_entry(code_range, 2));
|
||||||
tmp_loc.last_loc.column = NUM2LONG(rb_ary_entry(code_range, 3));
|
tmp_loc.last_loc.column = NUM2INT(rb_ary_entry(code_range, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
make_compile_option(&option, opt);
|
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("stack_max")), INT2FIX(iseq->body->stack_max));
|
||||||
rb_hash_aset(misc, ID2SYM(rb_intern("code_range")),
|
rb_hash_aset(misc, ID2SYM(rb_intern("code_range")),
|
||||||
rb_ary_new_from_args(4,
|
rb_ary_new_from_args(4,
|
||||||
LONG2FIX(iseq->body->location.code_range.first_loc.lineno),
|
INT2FIX(iseq->body->location.code_range.first_loc.lineno),
|
||||||
LONG2FIX(iseq->body->location.code_range.first_loc.column),
|
INT2FIX(iseq->body->location.code_range.first_loc.column),
|
||||||
LONG2FIX(iseq->body->location.code_range.last_loc.lineno),
|
INT2FIX(iseq->body->location.code_range.last_loc.lineno),
|
||||||
LONG2FIX(iseq->body->location.code_range.last_loc.column)));
|
INT2FIX(iseq->body->location.code_range.last_loc.column)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* [:magic, :major_version, :minor_version, :format_type, :misc,
|
* [:magic, :major_version, :minor_version, :format_type, :misc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue