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


in reply to Re^2: XS from XS?
in thread XS from XS?

I believe that second technique I described (the Time::HiRes approach) does exactly what you want. In the exporting module, you store function pointer address values within a global Perl hash as integer scalar values. In the importing module, you recover those function pointer address values from the integer scalars and cast them to function pointers of the appropriate type.