aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/vm_core.h b/vm_core.h
index e86026ab50..f6b81b57c6 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1970,18 +1970,17 @@ rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_ev
rb_exec_event_hooks(&trace_arg, hooks, pop_p);
}
-rb_hook_list_t *rb_ractor_hooks(rb_ractor_t *cr);;
+struct rb_ractor_pub {
+ VALUE self;
+ uint32_t id;
+ rb_hook_list_t hooks;
+};
static inline rb_hook_list_t *
rb_ec_ractor_hooks(const rb_execution_context_t *ec)
{
- rb_hook_list_t *hooks = rb_ractor_hooks(rb_ec_ractor_ptr(ec));
- if (LIKELY(hooks == NULL)) {
- return NULL;
- }
- else {
- return hooks;
- }
+ struct rb_ractor_pub *cr_pub = (struct rb_ractor_pub *)rb_ec_ractor_ptr(ec);
+ return &cr_pub->hooks;
}
#define EXEC_EVENT_HOOK(ec_, flag_, self_, id_, called_id_, klass_, data_) \