.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::Typemaps::OutputMap 3perl" .TH ExtUtils::Typemaps::OutputMap 3perl "2021-09-24" "perl v5.32.1" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" ExtUtils::Typemaps::OutputMap \- Entry in the OUTPUT section of a typemap .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& use ExtUtils::Typemaps; \& ... \& my $output = $typemap\->get_output_map(\*(AqT_NV\*(Aq); \& my $code = $output\->code(); \& $output\->code("..."); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Refer to ExtUtils::Typemaps for details. .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" Requires \f(CW\*(C`xstype\*(C'\fR and \f(CW\*(C`code\*(C'\fR parameters. .SS "code" .IX Subsection "code" Returns or sets the \s-1OUTPUT\s0 mapping code for this entry. .SS "xstype" .IX Subsection "xstype" Returns the name of the \s-1XS\s0 type of the \s-1OUTPUT\s0 map. .SS "cleaned_code" .IX Subsection "cleaned_code" Returns a cleaned-up copy of the code to which certain transformations have been applied to make it more \s-1ANSI\s0 compliant. .SS "targetable" .IX Subsection "targetable" This is an obscure but effective optimization that used to live in \f(CW\*(C`ExtUtils::ParseXS\*(C'\fR directly. Not implementing it should never result in incorrect use of typemaps, just less efficient code. .PP In a nutshell, this will check whether the output code involves calling \f(CW\*(C`sv_setiv\*(C'\fR, \f(CW\*(C`sv_setuv\*(C'\fR, \f(CW\*(C`sv_setnv\*(C'\fR, \f(CW\*(C`sv_setpv\*(C'\fR or \&\f(CW\*(C`sv_setpvn\*(C'\fR to set the special \f(CW$arg\fR placeholder to a new value \&\fB\s-1AT THE END OF THE OUTPUT CODE\s0\fR. If that is the case, the code is eligible for using the \f(CW\*(C`TARG\*(C'\fR\-related macros to optimize this. Thus the name of the method: \f(CW\*(C`targetable\*(C'\fR. .PP If this optimization is applicable, \f(CW\*(C`ExtUtils::ParseXS\*(C'\fR will emit a \f(CW\*(C`dXSTARG;\*(C'\fR definition at the start of the generated \s-1XSUB\s0 code, and type (see below) dependent code to set \f(CW\*(C`TARG\*(C'\fR and push it on the stack at the end of the generated \s-1XSUB\s0 code. .PP If the optimization can not be applied, this returns undef. If it can be applied, this method returns a hash reference containing the following information: .PP .Vb 5 \& type: Any of the characters i, u, n, p \& with_size: Bool indicating whether this is the sv_setpvn variant \& what: The code that actually evaluates to the output scalar \& what_size: If "with_size", this has the string length (as code, \& not constant, including leading comma) .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" ExtUtils::Typemaps .SH "AUTHOR" .IX Header "AUTHOR" Steffen Mueller \f(CW\*(C` .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2009, 2010, 2011, 2012 Steffen Mueller .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.