From e80ef4e6ce746d4fed988581a9dd4b5ef6181c22 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 29 Oct 2017 13:19:53 +0000 Subject: [PATCH] use `GET_VM()` directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_backtrace.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vm_backtrace.c b/vm_backtrace.c index a0815f1d6c..a10f848daf 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -331,8 +331,7 @@ location_to_str(rb_backtrace_location_t *loc) lineno = location_lineno(loc->body.cfunc.prev_loc); } else { - rb_thread_t *th = GET_THREAD(); - file = th->vm->progname; + file = GET_VM()->progname; lineno = INT2FIX(0); } name = rb_id2str(loc->body.cfunc.mid); @@ -674,9 +673,7 @@ static void oldbt_init(void *ptr, size_t dmy) { struct oldbt_arg *arg = (struct oldbt_arg *)ptr; - rb_thread_t *th = GET_THREAD(); - - arg->filename = th->vm->progname; + arg->filename = GET_VM()->progname; arg->lineno = 0; }