Simple extension question

M

Mark Probert

Hi ..

What is the easy way of clearing an array in an extension?

ie Given

VALUE t_init(VALUE self)
{
VALUE foo;

foo = rb_ary_new();
rb_iv_set(self, "@foo", foo);
}

How do I do the equivalent of "foo.clear" ?

Thanks,
 

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

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top