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. Advertisements

  2. Husam Senussi

    Roger Pack Guest

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

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:
    1,233
    Kathy Burke
    Jun 25, 2003
  2. pete
    Replies:
    1
    Views:
    3,346
    Jon Yates
    Aug 29, 2003
  3. timmso
    Replies:
    1
    Views:
    789
    Alex Papadimoulis
    Dec 12, 2003
  4. Replies:
    2
    Views:
    754
  5. =?Utf-8?B?R1REcml2ZXI=?=
    Replies:
    1
    Views:
    4,075
    Karl Seguin
    Feb 16, 2005
  6. telescient telescient via .NET 247

    How to transform xml variable to xsl file using asp.net using vb.net

    telescient telescient via .NET 247, Apr 4, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    992
    Matt Berther
    Apr 4, 2005
  7. Andy
    Replies:
    1
    Views:
    616
  8. -
    Replies:
    4
    Views:
    535
    P.Hill
    Jun 1, 2005
Loading...