Yet more issues...
Appears Inline::Struct has some parsing issues w/ certain declarations, notably,
char a[8]; // actually, any array declaration unsigned long b; // actually unsigned anything float x; // but double is OK
I think these are Inline C shortcomings, rather than Inline::Struct problems per se. At least these are areas in which Inline C also struggles.
You can use 'unsigned b' instead of 'unsigned long b' (works for both Inline::C and Inline::Struct).
In the past, if I wanted to pass an unsigned long/short (or a float), I passed it as an int (or a double) and then reassigned it internally to an unsigned long/short (or a float).
These days I usually just pass an SV* and then use the perl API constructs to have it treated as desired.
For arrays (with perl 5.8 only) you can pass an array by reference
(AV *). On 5.6 I have successfully used the typemap that comes with Math::FFT (which, I think, was in turn pinched from some other module) so that I could pass int*'s and double*'s directly to C. I think it also handled float*'s.
And the ellipsis method (SV* x, ...) for passing arrays works nicely, too.
Have a browse through 'perldoc Inline::C-Cookbook' and see if there's anything there that helps. I'm not exactly sure how/if any of the above relates to what you need.
My impression is that the 'perl API stuff' doesn't lend itself to Inline::Struct - and that you're gunna need the perl API for whatever it is you're trying to do - and that you'll end up writing your program as an Inline C script (without Inline::Struct).
Should be a quiet night at work tonight .... if I discover anything I'll let you know :-)
Cheers, Rob
--
Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.
