XSUBPP(1) | Perl Programmers Reference Guide | XSUBPP(1) |
xsubpp - compiler to convert Perl XS code into C code
xsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-typemap typemap] [-output filename]... file.xs
This compiler is typically run by the makefiles created by ExtUtils::MakeMaker or by Module::Build or other Perl module build tools.
xsubpp will compile XS code into C code by embedding the constructs necessary to let C functions manipulate Perl values and creates the glue necessary to let Perl access those functions. The compiler uses typemaps to determine how to map C function parameters and variables to Perl values.
The compiler will search for typemap files called typemap. It will use the following search path to find default typemaps, with the rightmost typemap taking precedence.
../../../typemap:../../typemap:../typemap:typemap
It will also use a default typemap installed as "ExtUtils::typemap".
Note that the "XSOPT" MakeMaker option may be used to add these options to any makefiles generated by MakeMaker.
If specified, the given string will be stripped off from the beginning of the C function name in the generated XS functions (if it starts with that prefix). This only applies to XSUBs without "CODE" or "PPCODE" blocks. For example, the XS:
void foo_bar(int i);
when "xsubpp" is invoked with "-s foo_" will install a "foo_bar" function in Perl, but really call bar(i) in C. Most of the time, this is the opposite of what you want and failure modes are somewhat obscure, so please avoid this option where possible.
No environment variables are used.
Originally by Larry Wall. Turned into the "ExtUtils::ParseXS" module by Ken Williams.
See the file Changes.
perl(1), perlxs(1), perlxstut(1), ExtUtils::ParseXS
2021-10-20 | perl v5.30.3 |