using rb_iseq_load

Discussion in 'Ruby' started by Husam Senussi, Aug 3, 2009.

  1. Hi,

    Is this API supported by ruby 1.9, I'm trying module to load pre-
    compiled version of a script but I endup with core dump.

    this the extension:


    #include <ruby.h>


    VALUE Loader = Qnil;

    VALUE load_ruby_iseq(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_loader()
    {
    Loader = rb_define_class("Loader", rb_cObject);
    rb_define_singleton_method(Loader, "load", load_ruby_iseq, -1);
    }


    This the first time i wrote ruby extension, so I'm guessing something
    wrong with my code !!!


    Thanks
    Husam
     
    Husam Senussi, Aug 3, 2009
    #1
    1. Advertising

  2. Husam Senussi

    Roger Pack Guest

    Roger Pack, Aug 8, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William F. Robertson, Jr.
    Replies:
    1
    Views:
    980
    Kathy Burke
    Jun 25, 2003
  2. pete
    Replies:
    1
    Views:
    2,948
    Jon Yates
    Aug 29, 2003
  3. timmso
    Replies:
    1
    Views:
    514
    Alex Papadimoulis
    Dec 12, 2003
  4. Replies:
    2
    Views:
    556
  5. =?Utf-8?B?R1REcml2ZXI=?=
    Replies:
    1
    Views:
    3,829
    Karl Seguin
    Feb 16, 2005
Loading...

Share This Page