I'm getting an error with Inline that suggests that Inline doesn't handle unsigned longs:
The problem is Inline::C::grammar (v0.43) doesn't parse "unsigned long". So if you thus declare a function, it doesn't get Inlined. As Clint mentioned, a work-around is to typedef an alias (and create a typemap for it). Alternately, I've a replacement for grammar.pm which handles unsigned. And is somewhat faster. If there is interest, I can post it on "Inline.pm Notes" http://www.vendian.org/mncharity/dir3/inline/ (I've also a draft Inline::SWIG, but that's a different fish.) Also, while I love Inline to death so far, it does make debugging the inline C a little painful because the compiler error messages in out.make refer to line numbers in the *derived* C source file. It would be very helpful if, when generating this file, Inline used a #line directive to get the line numbers to match up with the original mixed Perl/C source file. As a workaround, you might try the idiom use Inline C => '#line '.(__LINE__+1).' "'.__FILE__."\"\n".<<'ENDOFC'; ENDOFC Or, if you don't care about automated debugging, you can simply write #line directives directly in your code. Patching Inline and Inline::C to automatically do this for HEREdocs is straightforward, but for Inline::Files... more thought is required than I've given it. Cheers, Mitchell Charity
