diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-04 02:49:37 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-04 02:49:37 +0000 |
commit | bac9f65f707e8ffcb79389e5b10b32addc94dc01 (patch) | |
tree | 0136380e9398eef3a5728564b83146aaafe58b68 /vm.c | |
parent | 81a0c608eb73f1a250ec9ec11107280b8d086ef8 (diff) | |
download | ruby-bac9f65f707e8ffcb79389e5b10b32addc94dc01.tar.gz |
* 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 'vm.c')
-rw-r--r-- | vm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -736,7 +736,7 @@ rb_sourcefilename(void) rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp); if (cfp) { - return cfp->iseq->location.filename; + return cfp->iseq->location.path; } else { return Qnil; @@ -750,7 +750,7 @@ rb_sourcefile(void) rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp); if (cfp) { - return RSTRING_PTR(cfp->iseq->location.filename); + return RSTRING_PTR(cfp->iseq->location.path); } else { return 0; @@ -1414,9 +1414,9 @@ rb_thread_current_status(const rb_thread_t *th) if (cfp->pc != 0) { rb_iseq_t *iseq = cfp->iseq; int line_no = rb_vm_get_sourceline(cfp); - char *file = RSTRING_PTR(iseq->location.filename); + char *file = RSTRING_PTR(iseq->location.path); str = rb_sprintf("%s:%d:in `%s'", - file, line_no, RSTRING_PTR(iseq->location.name)); + file, line_no, RSTRING_PTR(iseq->location.label)); } } else if (cfp->me->def->original_id) { @@ -2164,7 +2164,7 @@ rb_vm_set_progname(VALUE filename) rb_thread_t *th = GET_VM()->main_thread; rb_control_frame_t *cfp = (void *)(th->stack + th->stack_size); --cfp; - cfp->iseq->location.filename = filename; + cfp->iseq->location.path = filename; } #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE |