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:
parent
dc513a13bb
commit
69ba9302c5
5
gc.c
5
gc.c
@ -1654,15 +1654,14 @@ rb_objspace_set_event_hook(const rb_event_flag_t event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
EXEC_EVENT_HOOK(th, event, th->cfp->self, 0, 0, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define gc_event_hook(objspace, event, data) do { \
|
#define gc_event_hook(objspace, event, data) do { \
|
||||||
if (UNLIKELY((objspace)->hook_events & (event))) { \
|
if (UNLIKELY((objspace)->hook_events & (event))) { \
|
||||||
gc_event_hook_body((objspace), (event), (data)); \
|
gc_event_hook_body(GET_THREAD(), (objspace), (event), (data)); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user