1XSUBPP(1)             User Contributed Perl Documentation            XSUBPP(1)
2
3
4

NAME

6       xsubpp - compiler to convert Perl XS code into C code
7

SYNOPSIS

9       xsubpp [-v] [-except] [-s pattern] [-prototypes] [-noversioncheck]
10       [-nolinenumbers] [-nooptimize] [-typemap typemap] [-output filename]...
11       file.xs
12

DESCRIPTION

14       This compiler is typically run by the makefiles created by
15       ExtUtils::MakeMaker or by Module::Build or other Perl module build
16       tools.
17
18       xsubpp will compile XS code into C code by embedding the constructs
19       necessary to let C functions manipulate Perl values and creates the
20       glue necessary to let Perl access those functions.  The compiler uses
21       typemaps to determine how to map C function parameters and variables to
22       Perl values.
23
24       The compiler will search for typemap files called typemap.  It will use
25       the following search path to find default typemaps, with the rightmost
26       typemap taking precedence.
27
28               ../../../typemap:../../typemap:../typemap:typemap
29
30       It will also use a default typemap installed as "ExtUtils::typemap".
31

OPTIONS

33       Note that the "XSOPT" MakeMaker option may be used to add these options
34       to any makefiles generated by MakeMaker.
35
36       -hiertype
37            Retains '::' in type names so that C++ hierarchical types can be
38            mapped.
39
40       -except
41            Adds exception handling stubs to the C code.
42
43       -typemap typemap
44            Indicates that a user-supplied typemap should take precedence over
45            the default typemaps.  This option may be used multiple times,
46            with the last typemap having the highest precedence.
47
48       -output filename
49            Specifies the name of the output file to generate.  If no file is
50            specified, output will be written to standard output.
51
52       -v   Prints the xsubpp version number to standard output, then exits.
53
54       -prototypes
55            By default xsubpp will not automatically generate prototype code
56            for all xsubs. This flag will enable prototypes.
57
58       -noversioncheck
59            Disables the run time test that determines if the object file
60            (derived from the ".xs" file) and the ".pm" files have the same
61            version number.
62
63       -nolinenumbers
64            Prevents the inclusion of '#line' directives in the output.
65
66       -nooptimize
67            Disables certain optimizations.  The only optimization that is
68            currently affected is the use of targets by the output C code (see
69            perlguts).  This may significantly slow down the generated code,
70            but this is the way xsubpp of 5.005 and earlier operated.
71
72       -noinout
73            Disable recognition of "IN", "OUT_LIST" and "INOUT_LIST"
74            declarations.
75
76       -noargtypes
77            Disable recognition of ANSI-like descriptions of function
78            signature.
79
80       -C++ Currently doesn't do anything at all.  This flag has been a no-op
81            for many versions of perl, at least as far back as perl5.003_07.
82            It's allowed here for backwards compatibility.
83
84       -s=... or -strip=...
85            This option is obscure and discouraged.
86
87            If specified, the given string will be stripped off from the
88            beginning of the C function name in the generated XS functions (if
89            it starts with that prefix).  This only applies to XSUBs without
90            "CODE" or "PPCODE" blocks.  For example, the XS:
91
92              void foo_bar(int i);
93
94            when "xsubpp" is invoked with "-s foo_" will install a "foo_bar"
95            function in Perl, but really call bar(i) in C. Most of the time,
96            this is the opposite of what you want and failure modes are
97            somewhat obscure, so please avoid this option where possible.
98

ENVIRONMENT

100       No environment variables are used.
101

AUTHOR

103       Originally by Larry Wall.  Turned into the "ExtUtils::ParseXS" module
104       by Ken Williams.
105

MODIFICATION HISTORY

107       See the file Changes.
108

SEE ALSO

110       perl(1), perlxs(1), perlxstut(1), ExtUtils::ParseXS
111
112
113
114perl v5.30.1                      2020-01-30                         XSUBPP(1)
Impressum