>>>>> "A" == Andy Neagu <andy_neagu / hotmail.com> writes:

A> How can I know the size of an ruby array?

 RARRAY(ary)->len

A> STR2CSTR makes a copy? Or gets only a pointer to?

 STR2CSTR call rb_str_to_str() (which call #to_str) is the object is not a
 String, then it return RSTRING(str)->ptr

A> If I want to pass to a function a pointer array of C strings and the strings
A> are in a ruby array of strings, how can I do??

 RARRAY(ary)->ptr give you a C pointer on VALUE

 For example, if you have only Strings in the Array

   for (i = 0; i < RARRAY(ary)->len; i++) {
      rb_warn("String %s", RSTRING(RARRAY(ary)->ptr[i])->ptr);
   }     



Guy Decoux