Currently Inline::C cannot support a function declared thusly:

  SV *named_func (...) {

  }

Instead you have to declare at least one required param:

  SV *named_func (SV *dummy, ...) {

  }

This makes implementing a function that may take zero or any number of
parameters impossible, which is common for functions that use a
named-parameter style.  This limitation is inherited from C's vararg
implementation but it's not clear to me why...  Perl doesn't use C's
vararg implementation to do variable argument XSUBs and neither do
Inline::C functions; they both use Perl's stack.

In my opinion, when Inline::C sees (...) it should generate an XSUB like
this (but using the Inline::C XS style):

  SV *
  named_func (...)
     CODE:
         RETVAL  = named_func();
     OUTPUT:
         RETVAL

And a C function with a void parameter list:

  SV *named_func (void) {

  }

Any reason we shouldn't do this?

-sam


Reply via email to