< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
>>>>> "J" == Jamie Knight <bigjim16 / btinternet.com> writes:
J> I know you need to use rb_funcall but how do you get the VALUE for the 1st
J> parameter(VALUE recv)? and what exactly is this parameter for?
This is self.
For example, in ruby you write
class A
def m(b)
end
end
a = A.new
a.m(12)
This can be written :
/* retrieve the class A */
klass = rb_const_get(rb_cObject, rb_intern("A"));
/* call the method new for A */
obj = rb_funcall(klass, rb_intern("new"), 0);
/* call the method m for this object */
rb_funcall(obj, rb_intern("m"), 1, INT2FIX(12));
J> I can't find any example programs embedding ruby in c or much documentation
J> except for the extending ruby chapter in pragmatic programmer which doesn't
J> seem to explain this.
You have example in RAA, like eruby ...
Guy Decoux