I am trying to rewrite a highly recursive function using inline C with Ruby. The function accepts an undefined number of arguments, i.e. it would look like this in Ruby:
def each_entity(*types)
# Do something and recurse.
end
I am trying to mimick this in inline C using the following code:
VALUE each_entity_c(int argc, VALUE *argv)
{
// ...
}
But this yields the compile error:
inline.rb:486:in `ruby2c': Unknown type "VALUE *" (ArgumentError)
Is this the correct way to accomplish this in C? If so, what could have caused this error? If not, how is it done?