http://qs321.pair.com?node_id=755892


in reply to weird XS_unpack_charPtrPtr error

A belated update. Shortly after posting, I (re-)discovered the NOCLEAN option to Inline, which enabled me to examine the generated *.c file, and from this I could see where the references to XS_unpack_charPtrPtr. So I never got to use BrowserUk's useful trick. (I've added to the old bag o' tricks for the future. Thanks.)

I found that apparently Inline was getting thrown off by the fact that in my C code some times I had the word static in the declaration of a function, but not in its subsequent definition; e.g.

static void foo (); ... void foo () { ... }
or even
static void foo (); ... static void foo () { ... }
...with the static keyword on a separate line. Either way, Inline was incorrectly treating these functions as ones to make callable from Perl. So adding the static keyword to the function definitions where Inline wanted it took care of the XS_unpack_charPtrPtr error. (It is a mystery to me why this problem arose only when I tried to make a downloadable package, and not before during my tests, since the C source code was exactly the same in both cases.)

But as it happened, all this turned out to be for nothing, and syphilis's observations and suggestions were right on the money. What I had been trying to do did not produce the desired degree of independence from Inline. For what I needed InlineX::C2XS was indeed the right tool. Many thanks!

the lowliest monk