in reply to How to pass a function reference from C to perl

What you probably want to do is convert the function pointer to an integer, and pass it as an IV. This is how perl handles pointers to blessed C objects created in XSUBs, so it should also work for function pointers. When perl calls the C code, convert the IV back to a function pointer and do the call. Alternately, you can pass mystruct1 as a blessed object. There's a neat tutorial on how to do this here.
  • Comment on Re: How to pass a function reference from C to perl