rb_frame_last_func()

  • Thread starter Elias Athanasopoulos
  • Start date
E

Elias Athanasopoulos

Hello!

I need to know from inside a C extension the Ruby method
which called a function (actually it is a C generic function
which serves a family of Ruby methods).

I do this:

char *methname = rb_id2name (rb_frame_last_func());

Is this the right way or is it time expensive? If it is not
the fastest way to retrieve the method name, can I do something
else?

Regards,
 
Y

Yukihiro Matsumoto

Hi,

In message "rb_frame_last_func()"

|I do this:
|
|char *methname = rb_id2name (rb_frame_last_func());
|
|Is this the right way or is it time expensive? If it is not
|the fastest way to retrieve the method name, can I do something
|else?

I think it's the right way. Calling rb_frame_last_func() is cheap.

matz.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top