Debian Codegraph @

upstream/mageia-cauldron/man3pm/ExtUtils::Typemaps::OutputMap.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "ExtUtils::Typemaps::OutputMap 3pm"
61 .TH ExtUtils::Typemaps::OutputMap 3pm 2025-06-24 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 ExtUtils::Typemaps::OutputMap \- Entry in the OUTPUT section of a typemap
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 5
71 \& use ExtUtils::Typemaps;
72 \& ...
73 \& my $output = $typemap\->get_output_map(\*(AqT_NV\*(Aq);
74 \& my $code = $output\->code();
75 \& $output\->code("...");
76 .Ve
77 .SH DESCRIPTION
78 .IX Header "DESCRIPTION"
79 Refer to ExtUtils::Typemaps for details.
80 .SH METHODS
81 .IX Header "METHODS"
82 .SS new
83 .IX Subsection "new"
84 Requires \f(CW\*(C`xstype\*(C'\fR and \f(CW\*(C`code\*(C'\fR parameters.
85 .SS code
86 .IX Subsection "code"
87 Returns or sets the OUTPUT mapping code for this entry.
88 .SS xstype
89 .IX Subsection "xstype"
90 Returns the name of the XS type of the OUTPUT map.
91 .SS cleaned_code
92 .IX Subsection "cleaned_code"
93 Returns a cleaned\-up copy of the code to which certain transformations
94 have been applied to make it more ANSI compliant.
95 .SS targetable_legacy
96 .IX Subsection "targetable_legacy"
97 Do not use for new code.
98 .PP
99 This is the original version of the \fBtargetable()\fR method, whose behaviour
100 has been frozen for backwards compatibility. It is used to determine
101 whether to emit an early \f(CW\*(C`dXSTARG\*(C'\fR, which will be in scope for most of
102 the XSUB. More recent XSUB code generation emits a \f(CW\*(C`dXSTARG\*(C'\fR in a tighter
103 scope if one has not already been emitted. Some XS code assumes that
104 \&\f(CW\*(C`TARG\*(C'\fR has been declared, so continue to declare it under the same
105 conditions as before. The newer \f(CW\*(C`targetable\*(C'\fR method may be true under
106 additional circumstances.
107 .PP
108 If the optimization can not be applied, this returns undef. If it can be
109 applied, this method returns a hash reference containing the following
110 information:
111 .PP
112 .Vb 5
113 \& type: Any of the characters i, u, n, p
114 \& with_size: Bool indicating whether this is the sv_setpvn variant
115 \& what: The code that actually evaluates to the output scalar
116 \& what_size: If "with_size", this has the string length (as code,
117 \& not constant, including leading comma)
118 .Ve
119 .SS targetable
120 .IX Subsection "targetable"
121 Class method.
122 .PP
123 Return a boolean indicating whether the supplied code snippet is suitable
124 for using TARG as the destination SV rather than an new mortal.
125 .PP
126 In principle most things are, except expressions which would set the SV
127 to a ref value. That can cause the referred value to never be freed, as
128 targs aren\*(Aqt freed (at least for the lifetime of their CV). So in
129 practice, we restrict it to an approved list of \fBsv_setfoo()\fR forms, and
130 only where there is no extra code following the \fBsv_setfoo()\fR (so we have to
131 match the closing bracket, allowing for nested brackets etc within).
132 .SH "SEE ALSO"
133 .IX Header "SEE ALSO"
134 ExtUtils::Typemaps
135 .SH AUTHOR
136 .IX Header "AUTHOR"
137 Steffen Mueller \f(CW\*(C`<[email protected]\*(C'\fR>
138 .SH "COPYRIGHT & LICENSE"
139 .IX Header "COPYRIGHT & LICENSE"
140 Copyright 2009, 2010, 2011, 2012 Steffen Mueller
141 .PP
142 This program is free software; you can redistribute it and/or
143 modify it under the same terms as Perl itself.