mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
12f368d6a4
commit
40b1aa9adf
4 changed files with 14 additions and 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
|
||||
|
|
6
proc.c
6
proc.c
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue