Calling "Signal" from a C module

Discussion in 'Ruby' started by Caleb Tennis, Dec 9, 2005.

  1. Caleb Tennis

    Caleb Tennis Guest

    If I'm writing a C extension, how would I go about calling "Signal.list" from
    within that extension?

    I would normally do something like this:

    rb_funcall(rb_mSignal, rb_intern("list"), 0);

    But there doesn't seem to be an rb_mSignal object available.

    Caleb
    Caleb Tennis, Dec 9, 2005
    #1
    1. Advertising

  2. Caleb Tennis

    ts Guest

    >>>>> "C" == Caleb Tennis <> writes:

    C> rb_funcall(rb_mSignal, rb_intern("list"), 0);

    VALUE xx_mSignal;

    xx_mSignal = rb_const_get(rb_cObject, rb_intern("Signal"));

    /* ... */

    rb_funcall(xx_mSignal, rb_intern("list"), 0);


    Guy Decoux
    ts, Dec 9, 2005
    #2
    1. Advertising

  3. Caleb Tennis

    Caleb Tennis Guest

    Thanks a bunch!

    On Friday 09 December 2005 09:24, ts wrote:
    > >>>>> "C" == Caleb Tennis <> writes:

    >
    > C> rb_funcall(rb_mSignal, rb_intern("list"), 0);
    >
    > VALUE xx_mSignal;
    >
    > xx_mSignal = rb_const_get(rb_cObject, rb_intern("Signal"));
    >
    > /* ... */
    >
    > rb_funcall(xx_mSignal, rb_intern("list"), 0);
    >
    >
    > Guy Decoux
    Caleb Tennis, Dec 9, 2005
    #3
    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. Michael Pronath
    Replies:
    1
    Views:
    1,140
    Diez B. Roggisch
    Jan 3, 2005
  2. Jack Orenstein

    threading.Thread vs. signal.signal

    Jack Orenstein, Sep 18, 2005, in forum: Python
    Replies:
    0
    Views:
    451
    Jack Orenstein
    Sep 18, 2005
  3. Weng Tianxiang
    Replies:
    2
    Views:
    637
    Jonathan Bromley
    Jan 30, 2007
  4. Nicolas Moreau
    Replies:
    9
    Views:
    3,086
  5. dibacco73
    Replies:
    1
    Views:
    630
    joris
    Feb 12, 2009
Loading...

Share This Page