develooper Front page | perl.perl5.porters | Postings from July 2001

Exporting C symbols with XS

Thread Next
From:
David M. Lloyd
Date:
July 10, 2001 12:55
Subject:
Exporting C symbols with XS
Message ID:
Pine.LNX.4.21.0107101444050.14204-100000@homebody.freemm.org
Is there a standard, platform-independant way I can export some C function
names from my XS module that allows other modules to use them?

My Callback module needs to be able to provide some C functions to other
modules but I can't think of a way to do it.  DynaLoader's man page says I
can't use 'dl_find_symbol' becase "The exact manner in which the address
is returned in $symref is not currently defined. The only initial
requirement is that $symref can be passed to, and understood by,
dl_install_xsub()."

For performance reasons, I don't want to make these functions xsubs if I
can avoid it, and defining Perl functions that return pointers to
functions just seems gross to me.

- D

<dmlloyd@tds.net>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About