Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created August 5, 2009 09:58
Show Gist options
  • Select an option

  • Save methodmissing/162618 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/162618 to your computer and use it in GitHub Desktop.
static VALUE
vafuncall(recv, mid, n, ar)
VALUE recv;
ID mid;
int n;
va_list *ar;
{
VALUE *argv;
if (n > 0) {
long i;
argv = ALLOCA_N(VALUE, n);
for (i=0;i<n;i++) {
argv[i] = va_arg(*ar, VALUE);
}
va_end(*ar);
}
else {
argv = 0;
}
return rb_call(CLASS_OF(recv), recv, mid, n, argv, 1, Qundef);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment