1ExtUtils::ParseXS(3pm) Perl Programmers Reference Guide ExtUtils::ParseXS(3pm)
2
3
4

NAME

6       ExtUtils::ParseXS - converts Perl XS code into C code
7

SYNOPSIS

9         use ExtUtils::ParseXS qw(process_file);
10
11         process_file( filename => 'foo.xs' );
12
13         process_file( filename => 'foo.xs',
14                       output => 'bar.c',
15                       'C++' => 1,
16                       typemap => 'path/to/typemap',
17                       hiertype => 1,
18                       except => 1,
19                       prototypes => 1,
20                       versioncheck => 1,
21                       linenumbers => 1,
22                       optimize => 1,
23                       prototypes => 1,
24                     );
25       =head1 DESCRIPTION
26
27       "ExtUtils::ParseXS" will compile XS code into C code by embedding the
28       constructs necessary to let C functions manipulate Perl values and
29       creates the glue necessary to let Perl access those functions.  The
30       compiler uses typemaps to determine how to map C function parameters
31       and variables to Perl values.
32
33       The compiler will search for typemap files called typemap.  It will use
34       the following search path to find default typemaps, with the rightmost
35       typemap taking precedence.
36
37               ../../../typemap:../../typemap:../typemap:typemap
38

EXPORT

40       None by default.  "process_file()" may be exported upon request.
41

FUNCTIONS

43       process_xs()
44           This function processes an XS file and sends output to a C file.
45           Named parameters control how the processing is done.  The following
46           parameters are accepted:
47
48           C++ Adds "extern "C"" to the C code.  Default is false.
49
50           hiertype
51               Retains "::" in type names so that C++ hierachical types can be
52               mapped.  Default is false.
53
54           except
55               Adds exception handling stubs to the C code.  Default is false.
56
57           typemap
58               Indicates that a user-supplied typemap should take precedence
59               over the default typemaps.  A single typemap may be specified
60               as a string, or multiple typemaps can be specified in an array
61               reference, with the last typemap having the highest precedence.
62
63           prototypes
64               Generates prototype code for all xsubs.  Default is false.
65
66           versioncheck
67               Makes sure at run time that the object file (derived from the
68               ".xs" file) and the ".pm" files have the same version number.
69               Default is true.
70
71           linenumbers
72               Adds "#line" directives to the C output so error messages will
73               look like they came from the original XS file.  Default is
74               true.
75
76           optimize
77               Enables certain optimizations.  The only optimization that is
78               currently affected is the use of targets by the output C code
79               (see perlguts).  Not optimizing may significantly slow down the
80               generated code, but this is the way xsubpp of 5.005 and earlier
81               operated.  Default is to optimize.
82
83           inout
84               Enable recognition of "IN", "OUT_LIST" and "INOUT_LIST"
85               declarations.  Default is true.
86
87           argtypes
88               Enable recognition of ANSI-like descriptions of function
89               signature.  Default is true.
90
91           s   I have no clue what this does.  Strips function prefixes?
92
93       errors()
94           This function returns the number of [a certain kind of] errors
95           encountered during processing of the XS file.
96

AUTHOR

98       Based on xsubpp code, written by Larry Wall.
99
100       Maintained by:
101
102       ·   Ken Williams, <ken@mathforum.org>
103
104       ·   David Golden, <dagolden@cpan.org>
105
107       Copyright 2002-2009 by Ken Williams, David Golden and other
108       contributors.  All rights reserved.
109
110       This library is free software; you can redistribute it and/or modify it
111       under the same terms as Perl itself.
112
113       Based on the ExtUtils::xsubpp code by Larry Wall and the Perl 5
114       Porters, which was released under the same license terms.
115

SEE ALSO

117       perl, ExtUtils::xsubpp, ExtUtils::MakeMaker, perlxs, perlxstut.
118
119
120
121perl v5.10.1                      2017-03-22            ExtUtils::ParseXS(3pm)
Impressum