{
    "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** (10 lines)\n- **EXPORT** (3 lines)\n- **METHODS** (55 lines)\n- **AUTHOR** (12 lines)\n- **COPYRIGHT** (8 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 constructs necessary to\nlet C functions manipulate Perl values and creates the glue necessary to let Perl access those\nfunctions. The compiler 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 the following search\npath to find default typemaps, with the rightmost typemap taking precedence.\n\n../../../typemap:../../typemap:../typemap:typemap\n\n### EXPORT\n\nNone by default. \"processfile()\" and/or \"reporterrorcount()\" may be exported upon request.\nUsing 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 method may be called as a\nfunction (this is the legacy interface) and will then use a singleton as invocant.\n\nNamed parameters control how the processing is done. The following parameters 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 mapped. Default is\nfalse.\n\nexcept\nAdds exception handling stubs to the C code. Default is false.\n\ntypemap\nIndicates that a user-supplied typemap should take precedence over the default typemaps.\nA single typemap may be specified as a string, or multiple typemaps can be specified in\nan array reference, 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 \".xs\" file) and the \".pm\"\nfiles have the same version number. Default is true.\n\nlinenumbers\nAdds \"#line\" directives to the C output so error messages will look like they came from\nthe original XS file. Default is true.\n\noptimize\nEnables certain optimizations. The only optimization that is currently affected is the\nuse of *target*s by the output C code (see perlguts). Not optimizing may significantly\nslow down the generated code, but this is the way xsubpp of 5.005 and earlier operated.\nDefault is to optimize.\n\ninout\nEnable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\" declarations. Default is true.\n\nargtypes\nEnable recognition of ANSI-like descriptions of function signature. Default is true.\n\ns   *Maintainer note:* I have no clue what this does. Strips function prefixes?\n\n$pxs->reporterrorcount()\nThis method returns the number of [a certain kind of] errors encountered during processing\nof the XS file.\n\nThe method may be called as a function (this is the legacy interface) and will then use a\nsingleton 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 contributors. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nBased on the \"ExtUtils::xsubpp\" code by Larry Wall and the Perl 5 Porters, which was released\nunder 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' );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "EXPORT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 55,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ExtUtils::ParseXS - converts Perl XS code into C code\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use 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",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"ExtUtils::ParseXS\" will compile XS code into C code by embedding the constructs necessary to\nlet C functions manipulate Perl values and creates the glue necessary to let Perl access those\nfunctions. The compiler 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 the following search\npath to find default typemaps, with the rightmost typemap taking precedence.\n\n../../../typemap:../../typemap:../typemap:typemap\n",
                "subsections": []
            },
            "EXPORT": {
                "content": "None by default. \"processfile()\" and/or \"reporterrorcount()\" may be exported upon request.\nUsing the functional interface is discouraged.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$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 method may be called as a\nfunction (this is the legacy interface) and will then use a singleton as invocant.\n\nNamed parameters control how the processing is done. The following parameters 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 mapped. Default is\nfalse.\n\nexcept\nAdds exception handling stubs to the C code. Default is false.\n\ntypemap\nIndicates that a user-supplied typemap should take precedence over the default typemaps.\nA single typemap may be specified as a string, or multiple typemaps can be specified in\nan array reference, 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 \".xs\" file) and the \".pm\"\nfiles have the same version number. Default is true.\n\nlinenumbers\nAdds \"#line\" directives to the C output so error messages will look like they came from\nthe original XS file. Default is true.\n\noptimize\nEnables certain optimizations. The only optimization that is currently affected is the\nuse of *target*s by the output C code (see perlguts). Not optimizing may significantly\nslow down the generated code, but this is the way xsubpp of 5.005 and earlier operated.\nDefault is to optimize.\n\ninout\nEnable recognition of \"IN\", \"OUTLIST\" and \"INOUTLIST\" declarations. Default is true.\n\nargtypes\nEnable recognition of ANSI-like descriptions of function signature. Default is true.\n\ns   *Maintainer note:* I have no clue what this does. Strips function prefixes?\n\n$pxs->reporterrorcount()\nThis method returns the number of [a certain kind of] errors encountered during processing\nof the XS file.\n\nThe method may be called as a function (this is the legacy interface) and will then use a\nsingleton as invocant.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Based 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",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2002-2014 by Ken Williams, David Golden and other contributors. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nBased on the \"ExtUtils::xsubpp\" code by Larry Wall and the Perl 5 Porters, which was released\nunder the same license terms.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "perl, ExtUtils::xsubpp, ExtUtils::MakeMaker, perlxs, perlxstut.\n",
                "subsections": []
            }
        }
    }
}