summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/-test-/iseq_load/iseq_load.c
blob: b4b9a8aa3dcf7abb737a19a8e57daace53cc1a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <ruby.h>

VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);

static VALUE
iseq_load(int argc, VALUE *argv, VALUE self)
{
    VALUE data, opt = Qnil;

    rb_scan_args(argc, argv, "11", &data, &opt);

    return rb_iseq_load(data, 0, opt);
}

void
Init_iseq_load(void)
{
    VALUE rb_cISeq = rb_path2class("RubyVM::InstructionSequence");

    rb_define_singleton_method(rb_cISeq, "iseq_load", iseq_load, -1);
}