зеркало из https://github.com/github/ruby.git
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:
Родитель
dc513a13bb
Коммит
69ba9302c5
5
gc.c
5
gc.c
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче