Name
XS_constant
Synopsis
XS_constantpackage,types,subname,c_subname
Generates the XS code to implement the Perl subroutine
package ::constant used by
package ::AUTOLOAD to load constants. This XS
code is a wrapper around a C subroutine usually generated by
C_constant and usually named
constant
types should be given either as a
comma-separated list of types that the C subroutine constant will generate or as a reference
to a hash. It should be the same list of types that C_constant was given. Otherwise,
XS_constant and C_constant may have different ideas
about the number of parameters passed to the C function constant.
You can call the Perl visible subroutine something other
than “constant” if you give the parameter
subname. The C subroutine it calls
defaults to the name of the Perl visible subroutine, unless you
give the parameter c_subname.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access