{
    "content": [
        {
            "type": "text",
            "text": "# ExtUtils::ParseXS::Utilities (perldoc)\n\n## NAME\n\nExtUtils::ParseXS::Utilities - Subroutines used with ExtUtils::ParseXS\n\n## SYNOPSIS\n\nuse ExtUtils::ParseXS::Utilities qw(\nstandardtypemaplocations\ntrimwhitespace\nCstring\nvalidprotostring\nprocesstypemaps\nmaptype\nstandardXSdefs\nassignfuncargs\nanalyzepreprocessorstatements\nsetcond\nWarn\nblurt\ndeath\ncheckconditionalpreprocessorstatements\nescapefileforlinedirective\nreporttypemapfailure\n);\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **SUBROUTINES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ExtUtils::ParseXS::Utilities",
        "section": "",
        "mode": "perldoc",
        "summary": "ExtUtils::ParseXS::Utilities - Subroutines used with ExtUtils::ParseXS",
        "synopsis": "use ExtUtils::ParseXS::Utilities qw(\nstandardtypemaplocations\ntrimwhitespace\nCstring\nvalidprotostring\nprocesstypemaps\nmaptype\nstandardXSdefs\nassignfuncargs\nanalyzepreprocessorstatements\nsetcond\nWarn\nblurt\ndeath\ncheckconditionalpreprocessorstatements\nescapefileforlinedirective\nreporttypemapfailure\n);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "SUBROUTINES",
                "lines": 266,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ExtUtils::ParseXS::Utilities - Subroutines used with ExtUtils::ParseXS\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use ExtUtils::ParseXS::Utilities qw(\nstandardtypemaplocations\ntrimwhitespace\nCstring\nvalidprotostring\nprocesstypemaps\nmaptype\nstandardXSdefs\nassignfuncargs\nanalyzepreprocessorstatements\nsetcond\nWarn\nblurt\ndeath\ncheckconditionalpreprocessorstatements\nescapefileforlinedirective\nreporttypemapfailure\n);\n",
                "subsections": []
            },
            "SUBROUTINES": {
                "content": "The following functions are not considered to be part of the public interface. They are\ndocumented here for the benefit of future maintainers of this module.\n\n\"standardtypemaplocations()\"\n*   Purpose\n\nProvide a list of filepaths where typemap files may be found. The filepaths -- relative\npaths to files (not just directory paths) -- appear in this list in lowest-to-highest\npriority.\n\nThe highest priority is to look in the current directory.\n\n'typemap'\n\nThe second and third highest priorities are to look in the parent of the current directory\nand a directory called lib/ExtUtils underneath the parent directory.\n\n'../typemap',\n'../lib/ExtUtils/typemap',\n\nThe fourth through ninth highest priorities are to look in the corresponding grandparent,\ngreat-grandparent and great-great-grandparent directories.\n\n'../../typemap',\n'../../lib/ExtUtils/typemap',\n'../../../typemap',\n'../../../lib/ExtUtils/typemap',\n'../../../../typemap',\n'../../../../lib/ExtUtils/typemap',\n\nThe tenth and subsequent priorities are to look in directories named ExtUtils which are\nsubdirectories of directories found in @INC -- *provided* a file named typemap actually\nexists in such a directory. Example:\n\n'/usr/local/lib/perl5/5.10.1/ExtUtils/typemap',\n\nHowever, these filepaths appear in the list returned by \"standardtypemaplocations()\" in\nreverse order, *i.e.*, lowest-to-highest.\n\n'/usr/local/lib/perl5/5.10.1/ExtUtils/typemap',\n'../../../../lib/ExtUtils/typemap',\n'../../../../typemap',\n'../../../lib/ExtUtils/typemap',\n'../../../typemap',\n'../../lib/ExtUtils/typemap',\n'../../typemap',\n'../lib/ExtUtils/typemap',\n'../typemap',\n'typemap'\n\n*   Arguments\n\nmy @stl = standardtypemaplocations( \\@INC );\n\nReference to @INC.\n\n*   Return Value\n\nArray holding list of directories to be searched for typemap files.\n\n\"trimwhitespace()\"\n*   Purpose\n\nPerform an in-place trimming of leading and trailing whitespace from the first argument\nprovided to the function.\n\n*   Argument\n\ntrimwhitespace($arg);\n\n*   Return Value\n\nNone. Remember: this is an *in-place* modification of the argument.\n\n\"Cstring()\"\n*   Purpose\n\nEscape backslashes (\"\\\") in prototype strings.\n\n*   Arguments\n\n$ProtoThisXSUB = Cstring($);\n\nString needing escaping.\n\n*   Return Value\n\nProperly escaped string.\n\n\"validprotostring()\"\n*   Purpose\n\nValidate prototype string.\n\n*   Arguments\n\nString needing checking.\n\n*   Return Value\n\nUpon success, returns the same string passed as argument.\n\nUpon failure, returns 0.\n\n\"processtypemaps()\"\n*   Purpose\n\nProcess all typemap files.\n\n*   Arguments\n\nmy $typemapsobject = processtypemaps( $args{typemap}, $pwd );\n\nList of two elements: \"typemap\" element from %args; current working directory.\n\n*   Return Value\n\nUpon success, returns an ExtUtils::Typemaps object.\n\n\"maptype()\"\n*   Purpose\n\nPerforms a mapping at several places inside \"PARAGRAPH\" loop.\n\n*   Arguments\n\n$type = maptype($self, $type, $varname);\n\nList of three arguments.\n\n*   Return Value\n\nString holding augmented version of second argument.\n\n\"standardXSdefs()\"\n*   Purpose\n\nWrites to the \".c\" output file certain preprocessor directives and function headers needed\nin all such files.\n\n*   Arguments\n\nNone.\n\n*   Return Value\n\nReturns true.\n\n\"assignfuncargs()\"\n*   Purpose\n\nPerform assignment to the \"funcargs\" attribute.\n\n*   Arguments\n\n$string = assignfuncargs($self, $argsref, $class);\n\nList of three elements. Second is an array reference; third is a string.\n\n*   Return Value\n\nString.\n\n\"analyzepreprocessorstatements()\"\n*   Purpose\n\nWithin each function inside each Xsub, print to the .c output file certain preprocessor\nstatements.\n\n*   Arguments\n\n( $self, $XSSworkidx, $BootCoderef ) =\nanalyzepreprocessorstatements(\n$self, $statement, $XSSworkidx, $BootCoderef\n);\n\nList of four elements.\n\n*   Return Value\n\nModifed values of three of the arguments passed to the function. In particular, the\n\"XSStack\" and \"InitFileCode\" attributes are modified.\n\n\"setcond()\"\n*   Purpose\n\n*   Arguments\n\n*   Return Value\n\n\"currentlinenumber()\"\n*   Purpose\n\nFigures out the current line number in the XS file.\n\n*   Arguments\n\n$self\n\n*   Return Value\n\nThe current line number.\n\n\"Warn()\"\n*   Purpose\n\n*   Arguments\n\n*   Return Value\n\n\"blurt()\"\n*   Purpose\n\n*   Arguments\n\n*   Return Value\n\n\"death()\"\n*   Purpose\n\n*   Arguments\n\n*   Return Value\n\n\"checkconditionalpreprocessorstatements()\"\n*   Purpose\n\n*   Arguments\n\n*   Return Value\n\n\"escapefileforlinedirective()\"\n*   Purpose\n\nEscapes a given code source name (typically a file name but can also be a command that was\nread from) so that double-quotes and backslashes are escaped.\n\n*   Arguments\n\nA string.\n\n*   Return Value\n\nA string with escapes for double-quotes and backslashes.\n\n\"reporttypemapfailure\"\n*   Purpose\n\nDo error reporting for missing typemaps.\n\n*   Arguments\n\nThe \"ExtUtils::ParseXS\" object.\n\nAn \"ExtUtils::Typemaps\" object.\n\nThe string that represents the C type that was not found in the typemap.\n\nOptionally, the string \"death\" or \"blurt\" to choose whether the error is immediately fatal\nor not. Default: \"blurt\"\n\n*   Return Value\n\nReturns nothing. Depending on the arguments, this may call \"death\" or \"blurt\", the former of\nwhich is fatal.\n",
                "subsections": []
            }
        }
    }
}