[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

retain VALUE from C extension

Gaspard Bucher

10/10/2007 3:30:00 PM

How do I tell ruby to increment it's garbage collector if I want to
keep hold of a VALUE in a C extension.

example:

VALUE message;

static VALUE store_message(VALUE self, VALUE msg) {
// tell ruby to retain....
// rb_retain(msg) ?
message = msg;
return Qnil;
}