Audio
view release on metacpan or search on metacpan
Data/mkVFunc view on Meta::CPAN
able to call functions defined in perl I<and> functions defined in loadable
.../Tk.so . Now functions in 'base executable' are a well known problem,
and are solved by DynaLoader. However most of dynamic loading schemes
cannot handle one loadable calling another loadable.
Thus what Tk does is build a table of functions that should be callable.
This table is auto-generated from the .h file by looking for
'extern' (and EXTERN which is #defined to 'extern').
Thus any function marked as 'extern' is 'referenced' by the table.
The address of the table is then stored in a perl variable when Tk is loaded.
When HList is loaded it looks in the perl variable (via functions
in perl - the 'base executable') to get the address of the table.
The same utility that builds the table also builds a set of #define's.
HList.c (and any other .c files which comprise HList) #include these
#define's. So that
Tk_SomeFunc(x,y,z)
Is actually compiled as
( run in 0.592 second using v1.01-cache-2.11-cpan-64827b87656 )