summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-04 02:49:37 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-04 02:49:37 +0000
commitbac9f65f707e8ffcb79389e5b10b32addc94dc01 (patch)
tree0136380e9398eef3a5728564b83146aaafe58b68 /proc.c
parent81a0c608eb73f1a250ec9ec11107280b8d086ef8 (diff)
* vm_core.h (rb_location_t): fix type and field name.
(1) rename rb_location_t to rb_iseq_location_t. (2) rename field names of rb_iseq_location_t to adjust RubyVM::Backtrace::Location methods. (2-1) filename -> path (2-2) filepath -> absolute_path (2-3) basename -> base_label (2-4) name -> label (3) rename filed name rb_iseq_location_t#line_no to rb_iseq_location_t#first_lineno to clear purpose of this field. (4) The field names rb_binding_t#(filename|line_no) are also renamed to rb_binding_t#(path|first_lineno). * compile.c: apply above changes. * iseq.c: ditto. * proc.c: ditto. * vm*.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/proc.c b/proc.c
index 3a354f0a00..b0437db9cd 100644
--- a/proc.c
+++ b/proc.c
@@ -256,7 +256,7 @@ binding_mark(void *ptr)
if (ptr) {
bind = ptr;
RUBY_MARK_UNLESS_NULL(bind->env);
- RUBY_MARK_UNLESS_NULL(bind->filename);
+ RUBY_MARK_UNLESS_NULL(bind->path);
}
RUBY_MARK_LEAVE("binding");
}
@@ -294,8 +294,8 @@ binding_dup(VALUE self)
GetBindingPtr(self, src);
GetBindingPtr(bindval, dst);
dst->env = src->env;
- dst->filename = src->filename;
- dst->line_no = src->line_no;
+ dst->path = src->path;
+ dst->first_lineno = src->first_lineno;
return bindval;
}
@@ -322,8 +322,8 @@ rb_binding_new(void)
GetBindingPtr(bindval, bind);
bind->env = rb_vm_make_env_object(th, cfp);
- bind->filename = cfp->iseq->location.filename;
- bind->line_no = rb_vm_get_sourceline(cfp);
+ bind->path = cfp->iseq->location.path;
+ bind->first_lineno = rb_vm_get_sourceline(cfp);
return bindval;
}
@@ -699,7 +699,7 @@ iseq_location(rb_iseq_t *iseq)
VALUE loc[2];
if (!iseq) return Qnil;
- loc[0] = iseq->location.filename;
+ loc[0] = iseq->location.path;
if (iseq->line_info_table) {
loc[1] = INT2FIX(rb_iseq_first_lineno(iseq));
}
@@ -843,14 +843,14 @@ proc_to_s(VALUE self)
is_lambda = proc->is_lambda ? " (lambda)" : "";
if (RUBY_VM_NORMAL_ISEQ_P(iseq)) {
- int line_no = 0;
+ int first_lineno = 0;
if (iseq->line_info_table) {
- line_no = rb_iseq_first_lineno(iseq);
+ first_lineno = rb_iseq_first_lineno(iseq);
}
str = rb_sprintf("#<%s:%p@%s:%d%s>", cname, (void *)self,
- RSTRING_PTR(iseq->location.filename),
- line_no, is_lambda);
+ RSTRING_PTR(iseq->location.path),
+ first_lineno, is_lambda);
}
else {
str = rb_sprintf("#<%s:%p%s>", cname, (void *)proc->block.iseq,
@@ -1980,12 +1980,12 @@ proc_binding(VALUE self)
GetBindingPtr(bindval, bind);
bind->env = proc->envval;
if (RUBY_VM_NORMAL_ISEQ_P(proc->block.iseq)) {
- bind->filename = proc->block.iseq->location.filename;
- bind->line_no = rb_iseq_first_lineno(proc->block.iseq);
+ bind->path = proc->block.iseq->location.path;
+ bind->first_lineno = rb_iseq_first_lineno(proc->block.iseq);
}
else {
- bind->filename = Qnil;
- bind->line_no = 0;
+ bind->path = Qnil;
+ bind->first_lineno = 0;
}
return bindval;
}