summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 818a6f9707..fbcb013e46 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -507,6 +507,15 @@ rb_iseq_check(const rb_iseq_t *iseq)
return iseq;
}
+static inline const rb_iseq_t *
+def_iseq_ptr(rb_method_definition_t *def)
+{
+#if VM_CHECK_MODE > 0
+ if (def->type != VM_METHOD_TYPE_ISEQ) rb_bug("def_iseq_ptr: not iseq (%d)", def->type);
+#endif
+ return rb_iseq_check(def->body.iseq.iseqptr);
+}
+
enum ruby_special_exceptions {
ruby_error_reenter,
ruby_error_nomemory,