diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-07 05:31:47 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-07 05:31:47 +0000 |
commit | 40b1aa9adf04fbd02dcd4bab1197659625951200 (patch) | |
tree | e1e606a3371ccc9e3dbdf62b9b650be2d1dc0ffb | |
parent | 12f368d6a48d7eb35a9c802d1ae4824b876f7c74 (diff) | |
download | ruby-40b1aa9adf04fbd02dcd4bab1197659625951200.tar.gz |
* proc.c: catch up last commit.
Type of return value of rb_iseq_first_lineno() is now VALUE.
* vm_insnhelper.c (argument_error): ditto.
* vm_method.c (rb_method_entry_make): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | proc.c | 6 | ||||
-rw-r--r-- | vm_insnhelper.c | 2 | ||||
-rw-r--r-- | vm_method.c | 2 |
4 files changed, 14 insertions, 5 deletions
@@ -1,3 +1,12 @@ +Mon Oct 7 14:26:01 2013 Koichi Sasada <ko1@atdot.net> + + * proc.c: catch up last commit. + Type of return value of rb_iseq_first_lineno() is now VALUE. + + * vm_insnhelper.c (argument_error): ditto. + + * vm_method.c (rb_method_entry_make): ditto. + Mon Oct 7 14:07:45 2013 Koichi Sasada <ko1@atdot.net> * iseq.c, internal.h: change to public (but internal) functions @@ -924,7 +924,7 @@ iseq_location(rb_iseq_t *iseq) if (!iseq) return Qnil; loc[0] = iseq->location.path; if (iseq->line_info_table) { - loc[1] = INT2FIX(rb_iseq_first_lineno(iseq->self)); + loc[1] = rb_iseq_first_lineno(iseq->self); } else { loc[1] = Qnil; @@ -1038,7 +1038,7 @@ proc_to_s(VALUE self) int first_lineno = 0; if (iseq->line_info_table) { - first_lineno = rb_iseq_first_lineno(iseq->self); + first_lineno = FIX2INT(rb_iseq_first_lineno(iseq->self)); } str = rb_sprintf("#<%s:%p@%"PRIsVALUE":%d%s>", cname, (void *)self, iseq->location.path, first_lineno, is_lambda); @@ -2382,7 +2382,7 @@ proc_binding(VALUE self) bind->env = proc->envval; if (RUBY_VM_NORMAL_ISEQ_P(proc->block.iseq)) { bind->path = proc->block.iseq->location.path; - bind->first_lineno = rb_iseq_first_lineno(proc->block.iseq->self); + bind->first_lineno = FIX2INT(rb_iseq_first_lineno(proc->block.iseq->self)); } else { bind->path = Qnil; diff --git a/vm_insnhelper.c b/vm_insnhelper.c index b352767922..fc9491f312 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -131,7 +131,7 @@ argument_error(const rb_iseq_t *iseq, int miss_argc, int min_argc, int max_argc) VALUE err_line = 0; if (iseq) { - int line_no = rb_iseq_first_lineno(iseq->self); + int line_no = FIX2INT(rb_iseq_first_lineno(iseq->self)); err_line = rb_sprintf("%s:%d:in `%s'", RSTRING_PTR(iseq->location.path), diff --git a/vm_method.c b/vm_method.c index 54c024bd06..da1a94c70a 100644 --- a/vm_method.c +++ b/vm_method.c @@ -290,7 +290,7 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type, break; } if (iseq && !NIL_P(iseq->location.path)) { - int line = iseq->line_info_table ? rb_iseq_first_lineno(iseq->self) : 0; + int line = iseq->line_info_table ? FIX2INT(rb_iseq_first_lineno(iseq->self)) : 0; rb_compile_warning(RSTRING_PTR(iseq->location.path), line, "previous definition of %s was here", rb_id2name(old_def->original_id)); |