{
    "mode": "perldoc",
    "parameter": "ExtUtils::Typemaps::OutputMap",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/ExtUtils%3A%3ATypemaps%3A%3AOutputMap/json",
    "generated": "2026-08-17T16:45:48Z",
    "synopsis": "use ExtUtils::Typemaps;\n...\nmy $output = $typemap->getoutputmap('TNV');\nmy $code = $output->code();\n$output->code(\"...\");",
    "sections": {
        "NAME": {
            "content": "ExtUtils::Typemaps::OutputMap - Entry in the OUTPUT section of a typemap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use ExtUtils::Typemaps;\n...\nmy $output = $typemap->getoutputmap('TNV');\nmy $code = $output->code();\n$output->code(\"...\");\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Refer to ExtUtils::Typemaps for details.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new\nRequires \"xstype\" and \"code\" parameters.\n\ncode\nReturns or sets the OUTPUT mapping code for this entry.\n\nxstype\nReturns the name of the XS type of the OUTPUT map.\n\ncleanedcode\nReturns a cleaned-up copy of the code to which certain transformations have been applied to make\nit more ANSI compliant.\n\ntargetable\nThis is an obscure but effective optimization that used to live in \"ExtUtils::ParseXS\" directly.\nNot implementing it should never result in incorrect use of typemaps, just less efficient code.\n\nIn a nutshell, this will check whether the output code involves calling \"svsetiv\", \"svsetuv\",\n\"svsetnv\", \"svsetpv\" or \"svsetpvn\" to set the special $arg placeholder to a new value AT THE\nEND OF THE OUTPUT CODE. If that is the case, the code is eligible for using the \"TARG\"-related\nmacros to optimize this. Thus the name of the method: \"targetable\".\n\nIf this optimization is applicable, \"ExtUtils::ParseXS\" will emit a \"dXSTARG;\" definition at the\nstart of the generated XSUB code, and type (see below) dependent code to set \"TARG\" and push it\non the stack at the end of the generated XSUB code.\n\nIf the optimization can not be applied, this returns undef. If it can be applied, this method\nreturns a hash reference containing the following information:\n\ntype:      Any of the characters i, u, n, p\nwithsize: Bool indicating whether this is the svsetpvn variant\nwhat:      The code that actually evaluates to the output scalar\nwhatsize: If \"withsize\", this has the string length (as code,\nnot constant, including leading comma)\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ExtUtils::Typemaps\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Steffen Mueller \"<smueller@cpan.org\">\n\nCOPYRIGHT & LICENSE\nCopyright 2009, 2010, 2011, 2012 Steffen Mueller\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "ExtUtils::Typemaps::OutputMap - Entry in the OUTPUT section of a typemap",
    "flags": [],
    "examples": [],
    "see_also": []
}