summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 13:22:04 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 13:22:04 +0000
commitad1b64d35d7ca980a0398f09cff527d7420cd5c1 (patch)
tree8feddbfa970ca8663d196e050013800b8ff4030f /vm_eval.c
parent7fa4beba91d37a91dbacb5faa5e12202202ba2d8 (diff)
`th` -> `ec` for backtrace functions.
* vm_backtrace.c: accept `ec` and rename `threadptr` to `ec`. * rb_threadptr_backtrace_object -> rb_ec_backtrace_object * rb_threadptr_backtrace_str_ary -> rb_ec_backtrace_str_ar * rb_threadptr_backtrace_location_ary -> rb_ec_backtrace_location_ary * threadptr_backtrace_to_ary -> ec_backtrace_to_ary * vm_eval.c (adjust_backtrace_in_eval): accepts `ec`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_eval.c b/vm_eval.c
index cb3b33e..15cdce7 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1243,12 +1243,12 @@ rb_each(VALUE obj)
}
static VALUE
-adjust_backtrace_in_eval(rb_thread_t *th, VALUE errinfo)
+adjust_backtrace_in_eval(const rb_execution_context_t *ec, VALUE errinfo)
{
VALUE errat = rb_get_backtrace(errinfo);
VALUE mesg = rb_attr_get(errinfo, id_mesg);
if (RB_TYPE_P(errat, T_ARRAY)) {
- VALUE bt2 = rb_threadptr_backtrace_str_ary(th, 0, 0);
+ VALUE bt2 = rb_ec_backtrace_str_ary(ec, 0, 0);
if (RARRAY_LEN(bt2) > 0) {
if (RB_TYPE_P(mesg, T_STRING) && !RSTRING_LEN(mesg)) {
rb_ivar_set(errinfo, id_mesg, RARRAY_AREF(errat, 0));
@@ -1318,7 +1318,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_
iseq = rb_iseq_compile_with_option(src, fname, realpath, INT2FIX(line), base_block, Qnil);
if (!iseq) {
- rb_exc_raise(adjust_backtrace_in_eval(rb_ec_thread_ptr(ec), ec->errinfo));
+ rb_exc_raise(adjust_backtrace_in_eval(ec, ec->errinfo));
}
/* TODO: what the code checking? */
@@ -1357,7 +1357,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_
if (state) {
if (state == TAG_RAISE) {
- adjust_backtrace_in_eval(rb_ec_thread_ptr(ec), ec->errinfo);
+ adjust_backtrace_in_eval(ec, ec->errinfo);
}
EC_JUMP_TAG(ec, state);
}