1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use GET_EC()

* vm.c (vm_ep_in_heap_p_): use GET_EC() instead of GET_THREAD().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-10-26 10:52:05 +00:00
parent 32c41f0c7c
commit f3400dfd81

6
vm.c
View file

@ -138,9 +138,9 @@ vm_ep_in_heap_p_(const rb_execution_context_t *ec, const VALUE *ep)
int
rb_vm_ep_in_heap_p(const VALUE *ep)
{
rb_thread_t *th = GET_THREAD();
if (th->ec->vm_stack == NULL) return TRUE;
return vm_ep_in_heap_p_(th->ec, ep);
const rb_execution_context_t *ec = GET_EC();
if (ec->vm_stack == NULL) return TRUE;
return vm_ep_in_heap_p_(ec, ep);
}
#endif