{
    "content": [
        {
            "type": "text",
            "text": "# ExtUtils::ParseXS (perldoc)\n\n**Summary:** ExtUtils::ParseXS - converts Perl XS code into C code\n\n**Synopsis:** use ExtUtils::ParseXS;\nmy $pxs = ExtUtils::ParseXS->new;\n$pxs->processfile( filename => 'foo.xs' );\n$pxs->processfile( filename => 'foo.xs',\noutput => 'bar.c',\n'C++' => 1,\ntypemap => 'path/to/typemap',\nhiertype => 1,\nexcept => 1,\nversioncheck => 1,\nlinenumbers => 1,\noptimize => 1,\nprototypes => 1,\n);\n# Legacy non-OO interface using a singleton:\nuse ExtUtils::ParseXS qw(processfile);\nprocessfile( filename => 'foo.xs' );\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (21 lines)\n- **DESCRIPTION** (12 lines)\n- **EXPORT** (3 lines)\n- **METHODS** (63 lines)\n- **AUTHOR** (12 lines)\n- **COPYRIGHT** (9 lines)\n- **SEE ALSO** (2 lines)\n\n## Full Content\n\n### NAME\n\nExtUtils::ParseXS - converts Perl XS code into C code\n\n### SYNOPSIS\n\nuse ExtUtils::ParseXS;\n\nmy $pxs = ExtUtils::ParseXS->new;\n$pxs->processfile( filename => 'foo.xs' );\n\n$pxs->processfile( filename => 'foo.xs',\noutput => 'bar.c',\n'C++' => 1,\ntypemap => 'path/to/typemap',\nhiertype => 1,\nexcept => 1,\nversioncheck => 1,\nlinenumbers => 1,\noptimize => 1,\nprototypes => 1,\n);\n\n# Legacy non-OO interface using a singleton:\nuse ExtUtils::ParseXS qw(processfile);\nprocessfile( filename => 'foo.xs' );\n\n### DESCRIPTION\n\n\"ExtUtils::ParseXS\" will compile XS code into C code by embedding the\nconstructs necessary to let C functions manipulate Perl values and\ncreates the glue necessary to let Perl access those functions. The\ncompiler uses typemaps to determine how to map C function parameters and\nvariables to Perl values.\n\nThe compiler will search for typemap files called *typemap*. It will use\nthe following search path to find default typemaps, with the rightmost\ntypemap taking precedence.\n\n../../../typemap:../../typemap:../typemap:typemap\n\n### EXPORT\n\nNone by default. \"processfile()\" and/or \"reporterrorcount()\" may be\nexported upon request. Using the functional interface is discouraged.\n\n### METHODS\n\n$pxs->new()\nReturns a new, empty XS parser/compiler object.\n\n$pxs->processfile()\nThis method processes an XS file and sends output to a C file. The\nmethod may be called as a function (this is the legacy interface)\nand will then use a singleton as invocant.\n\nNamed parameters control how the processing is done. The following\nparameters are accepted:\n\nC++ Adds \"extern \"C\"\" to the C code. Default is false.\n\nhiertype\nRetains \"::\" in type names so that C++ hierarchical types can be\nmapped. Default is false.\n\nexcept\nAdds exception handling stubs to the C code. Default is false.\n\ntypemap\nIndicates that a user-supplied typemap should take precedence\nover the default typemaps. A single typemap may be specified as\na string, or multiple typemaps can be specified in an array\nreference, with the last typemap having the highest precedence.\n\nprototypes\nGenerates prototype code for all xsubs. Default is false.\n\nversioncheck\nMakes sure at run time that the object file (derived from the\n\".xs\" file) and the \".pm\" files have the same version number.\nDefault is true.\n\nlinenumbers\nAdds \"#line\" directives to the C output so error messages will\nlook like they came from the original XS file. Default is true.\n\noptimize\nEnables certain optimizations. The only optimization that is\ncurrently affected is the use of *target*s by the output C code\n(see perlguts). Not optimizing may significantly slow down the\ngenerated code, but this is the way xsubpp of 5.005 and earlier\noperated. Default is to optimize.\n\ninout\nEnable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\"\ndeclarations. Default is true.\n\nargtypes\nEnable recognition of ANSI-like descriptions of function\nsignature. Default is true.\n\ns   *Maintainer note:* I have no clue what this does. Strips\nfunction prefixes?\n\n$pxs->reporterrorcount()\nThis method returns the number of [a certain kind of] errors\nencountered during processing of the XS file.\n\nThe method may be called as a function (this is the legacy\ninterface) and will then use a singleton as invocant.\n\n### AUTHOR\n\nBased on xsubpp code, written by Larry Wall.\n\nMaintained by:\n\n*   Ken Williams, <ken@mathforum.org>\n\n*   David Golden, <dagolden@cpan.org>\n\n*   James Keenan, <jkeenan@cpan.org>\n\n*   Steffen Mueller, <smueller@cpan.org>\n\n### COPYRIGHT\n\nCopyright 2002-2014 by Ken Williams, David Golden and other\ncontributors. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n\nBased on the \"ExtUtils::xsubpp\" code by Larry Wall and the Perl 5\nPorters, which was released under the same license terms.\n\n### SEE ALSO\n\nperl, ExtUtils::xsubpp, ExtUtils::MakeMaker, perlxs, perlxstut.\n\n"
        }
    ],
    "structuredContent": {
        "command": "ExtUtils::ParseXS",
        "section": "",
        "mode": "perldoc",
        "summary": "ExtUtils::ParseXS - converts Perl XS code into C code",
        "synopsis": "use ExtUtils::ParseXS;\nmy $pxs = ExtUtils::ParseXS->new;\n$pxs->processfile( filename => 'foo.xs' );\n$pxs->processfile( filename => 'foo.xs',\noutput => 'bar.c',\n'C++' => 1,\ntypemap => 'path/to/typemap',\nhiertype => 1,\nexcept => 1,\nversioncheck => 1,\nlinenumbers => 1,\noptimize => 1,\nprototypes => 1,\n);\n# Legacy non-OO interface using a singleton:\nuse ExtUtils::ParseXS qw(processfile);\nprocessfile( filename => 'foo.xs' );",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "EXPORT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 63,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ]
    }
}