summaryrefslogtreecommitdiff
path: root/ext/-test-/iseq_load/iseq_load.c
blob: ffdde347e14a4f2a87d20a93ea19a254b51a41bc (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_eval_string("RubyVM::InstructionSequence");

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