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

gc.c: event hook thread argument

* gc.c (gc_event_hook_body): move th to an argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-26 00:16:38 +00:00
parent dc513a13bb
commit 69ba9302c5

5
gc.c
View file

@ -1654,15 +1654,14 @@ rb_objspace_set_event_hook(const rb_event_flag_t event)
}
static void
gc_event_hook_body(rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
gc_event_hook_body(rb_thread_t *th, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
{
rb_thread_t *th = GET_THREAD();
EXEC_EVENT_HOOK(th, event, th->cfp->self, 0, 0, data);
}
#define gc_event_hook(objspace, event, data) do { \
if (UNLIKELY((objspace)->hook_events & (event))) { \
gc_event_hook_body((objspace), (event), (data)); \
gc_event_hook_body(GET_THREAD(), (objspace), (event), (data)); \
} \
} while (0)