|Think about Loose Coupling|
XS/Inline::C and ellipsis syntaxby syphilis (Canon)
|on Jun 28, 2008 at 13:18 UTC||Need Help??|
syphilis has asked for the
wisdom of the Perl Monks concerning the following question:
In response to XS on 64-bit: Warning from sv_vsetpvf call almut posted some code that led me to the following Inline::C script:
which outputs (on Win32):
which is correct and as expected.
But then I got to wondering whether vatest() could be called directly from perl - ie, instead of having the perl section of the above script do foo(); have it do something like vatest('%s %s', 'foo', 'bar'); which would output foo bar: No error.
But, of course, that doesn't work - and I'm unable to find a way of making it work.
So, is there a way of accessing the XSub vatest() directly from perl (with either XS or Inline::C) ? I'm pretty sure there isn't ... but I'm so often wrong. Faik, there could well be some clever typemapping (or other technique) that makes it possible.