3. Can I pass a pointer to a function and have the C library call it
No. See perlcall for how to do it (it comes with several examples).
Well, the answer really is "Yes. See perlcall for how to do it" :)
You can do anything with XS, but you have to provide enough "glue" so that the code provided by your C library cooperates nice with the rest of perl interfaces.
In reply to Re^2: Extending with C functions - some basic questions
by andal
in thread Extending with C functions - some basic questions
by unlinker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |