Displaying 1 result from an estimated 1 matches for "strlistv".
Did you mean:
strlist
2011 Jan 05
0
Fwd: Review of libguestfs ruby bindings
...think you can remove the check
entirely; either you will get back a valid string (even if it is empty), or the
interpreter will raise an exception (in which case the rest of your function
won't be called anyway).
7) In ruby_guestfs_test0() and other places, there is code like:
Check_Type (strlistv, T_ARRAY);
{
size_t i, len;
len = RARRAY_LEN (strlistv);
strlist = guestfs_safe_malloc (g, sizeof (char *) * (len+1));
for (i = 0; i < len; ++i) {
VALUE v = rb_ary_entry (strlistv, i);
strlist[i] = StringValueCStr (v);
}
strlist[len] = NULL;
}
Unfortunate...