line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::APIReference::V5_012_000; |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
4
|
use parent 'Perl::APIReference'; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
7
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
7
|
|
|
7
|
1
|
12
|
my $class = shift; |
8
|
7
|
|
|
|
|
10
|
my $VAR1; |
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
|
|
8
|
do{$VAR1 = {'newBINOP' => {'text' => '','name' => 'newBINOP'},'strGE' => {'text' => 'Test two strings to see if the first, C, is greater than or equal to |
|
7
|
|
|
|
|
11783
|
|
11
|
|
|
|
|
|
|
the second, C. Returns true or false. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
bool strGE(char* s1, char* s2)','name' => 'strGE'},'SvPV' => {'text' => 'Returns a pointer to the string in the SV, or a stringified form of |
14
|
|
|
|
|
|
|
the SV if the SV does not contain a string. The SV may cache the |
15
|
|
|
|
|
|
|
stringified version becoming C. Handles \'get\' magic. See also |
16
|
|
|
|
|
|
|
C for a version which guarantees to evaluate sv only once. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
char* SvPV(SV* sv, STRLEN len)','name' => 'SvPV'},'sv_vsetpvf_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Usually used via its frontend C. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
void sv_vsetpvf_mg(SV *const sv, const char *const pat, va_list *const args)','name' => 'sv_vsetpvf_mg'},'SvPVutf8' => {'text' => 'Like C, but converts sv to utf8 first if necessary. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
char* SvPVutf8(SV* sv, STRLEN len)','name' => 'SvPVutf8'},'sortsv_flags' => {'text' => 'Sort an array, with various options. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
void sortsv_flags(SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags)','name' => 'sortsv_flags'},'vwarn' => {'text' => '','name' => 'vwarn'},'scan_oct' => {'text' => 'For backwards compatibility. Use C instead. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
NV scan_oct(const char* start, STRLEN len, STRLEN* retlen)','name' => 'scan_oct'},'my_strlcat' => {'text' => '','name' => 'my_strlcat'},'av_arylen_p' => {'text' => '','name' => 'av_arylen_p'},'newGVOP' => {'text' => '','name' => 'newGVOP'},'gv_add_by_type' => {'text' => '','name' => 'gv_add_by_type'},'is_uni_ascii' => {'text' => '','name' => 'is_uni_ascii'},'find_runcv' => {'text' => 'Locate the CV corresponding to the currently executing sub or eval. |
29
|
|
|
|
|
|
|
If db_seqp is non_null, skip CVs that are in the DB package and populate |
30
|
|
|
|
|
|
|
*db_seqp with the cop sequence number at the point that the DB:: code was |
31
|
|
|
|
|
|
|
entered. (allows debuggers to eval in the scope of the breakpoint rather |
32
|
|
|
|
|
|
|
than in the scope of the debugger itself). |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
CV* find_runcv(U32 *db_seqp)','name' => 'find_runcv'},'utf8n_to_uvuni' => {'text' => 'Bottom level UTF-8 decode routine. |
35
|
|
|
|
|
|
|
Returns the Unicode code point value of the first character in the string C |
36
|
|
|
|
|
|
|
which is assumed to be in UTF-8 encoding and no longer than C; |
37
|
|
|
|
|
|
|
C will be set to the length, in bytes, of that character. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
If C does not point to a well-formed UTF-8 character, the behaviour |
40
|
|
|
|
|
|
|
is dependent on the value of C: if it contains UTF8_CHECK_ONLY, |
41
|
|
|
|
|
|
|
it is assumed that the caller will raise a warning, and this function |
42
|
|
|
|
|
|
|
will silently just set C to C<-1> and return zero. If the |
43
|
|
|
|
|
|
|
C does not contain UTF8_CHECK_ONLY, warnings about |
44
|
|
|
|
|
|
|
malformations will be given, C will be set to the expected |
45
|
|
|
|
|
|
|
length of the UTF-8 character in bytes, and zero will be returned. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The C can also contain various flags to allow deviations from |
48
|
|
|
|
|
|
|
the strict UTF-8 encoding (see F). |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Most code should use utf8_to_uvchr() rather than call this directly. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)','name' => 'utf8n_to_uvuni'},'newSVpvn_utf8' => {'text' => 'Creates a new SV and copies a string into it. If utf8 is true, calls |
53
|
|
|
|
|
|
|
C on the new SV. Implemented as a wrapper around C. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
SV* newSVpvn_utf8(NULLOK const char* s, STRLEN len, U32 utf8)','name' => 'newSVpvn_utf8'},'dMARK' => {'text' => 'Declare a stack marker variable, C, for the XSUB. See C and |
56
|
|
|
|
|
|
|
C. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
dMARK;','name' => 'dMARK'},'pregcomp' => {'text' => '','name' => 'pregcomp'},'my_cxt_index' => {'text' => '','name' => 'my_cxt_index'},'lex_discard_to' => {'text' => 'Discards the first part of the Llinestr> buffer, |
59
|
|
|
|
|
|
|
up to I. The remaining content of the buffer will be moved, and |
60
|
|
|
|
|
|
|
all pointers into the buffer updated appropriately. I must not |
61
|
|
|
|
|
|
|
be later in the buffer than the position of Lbufptr>: |
62
|
|
|
|
|
|
|
it is not permitted to discard text that has yet to be lexed. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Normally it is not necessarily to do this directly, because it suffices to |
65
|
|
|
|
|
|
|
use the implicit discarding behaviour of L and things |
66
|
|
|
|
|
|
|
based on it. However, if a token stretches across multiple lines, |
67
|
|
|
|
|
|
|
and the lexing code has kept multiple lines of text in the buffer fof |
68
|
|
|
|
|
|
|
that purpose, then after completion of the token it would be wise to |
69
|
|
|
|
|
|
|
explicitly discard the now-unneeded earlier lines, to avoid future |
70
|
|
|
|
|
|
|
multi-line tokens growing the buffer without bound. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
73
|
|
|
|
|
|
|
removed without notice. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
void lex_discard_to(char *ptr)','name' => 'lex_discard_to'},'markstack_grow' => {'text' => '','name' => 'markstack_grow'},'ibcmp_utf8' => {'text' => 'Return true if the strings s1 and s2 differ case-insensitively, false |
76
|
|
|
|
|
|
|
if not (if they are equal case-insensitively). If u1 is true, the |
77
|
|
|
|
|
|
|
string s1 is assumed to be in UTF-8-encoded Unicode. If u2 is true, |
78
|
|
|
|
|
|
|
the string s2 is assumed to be in UTF-8-encoded Unicode. If u1 or u2 |
79
|
|
|
|
|
|
|
are false, the respective string is assumed to be in native 8-bit |
80
|
|
|
|
|
|
|
encoding. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
If the pe1 and pe2 are non-NULL, the scanning pointers will be copied |
83
|
|
|
|
|
|
|
in there (they will point at the beginning of the I character). |
84
|
|
|
|
|
|
|
If the pointers behind pe1 or pe2 are non-NULL, they are the end |
85
|
|
|
|
|
|
|
pointers beyond which scanning will not continue under any |
86
|
|
|
|
|
|
|
circumstances. If the byte lengths l1 and l2 are non-zero, s1+l1 and |
87
|
|
|
|
|
|
|
s2+l2 will be used as goal end pointers that will also stop the scan, |
88
|
|
|
|
|
|
|
and which qualify towards defining a successful match: all the scans |
89
|
|
|
|
|
|
|
that define an explicit length must reach their goal pointers for |
90
|
|
|
|
|
|
|
a match to succeed). |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
For case-insensitiveness, the "casefolding" of Unicode is used |
93
|
|
|
|
|
|
|
instead of upper/lowercasing both the characters, see |
94
|
|
|
|
|
|
|
http://www.unicode.org/unicode/reports/tr21/ (Case Mappings). |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
I32 ibcmp_utf8(const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)','name' => 'ibcmp_utf8'},'mXPUSHp' => {'text' => 'Push a string onto the stack, extending the stack if necessary. The C |
97
|
|
|
|
|
|
|
indicates the length of the string. Does not use C. See also C, |
98
|
|
|
|
|
|
|
C and C. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
void mXPUSHp(char* str, STRLEN len)','name' => 'mXPUSHp'},'lex_stuff_sv' => {'text' => 'Insert characters into the lexer buffer (Llinestr>), |
101
|
|
|
|
|
|
|
immediately after the current lexing point (Lbufptr>), |
102
|
|
|
|
|
|
|
reallocating the buffer if necessary. This means that lexing code that |
103
|
|
|
|
|
|
|
runs later will see the characters as if they had appeared in the input. |
104
|
|
|
|
|
|
|
It is not recommended to do this as part of normal parsing, and most |
105
|
|
|
|
|
|
|
uses of this facility run the risk of the inserted characters being |
106
|
|
|
|
|
|
|
interpreted in an unintended manner. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
The string to be inserted is the string value of I. The characters |
109
|
|
|
|
|
|
|
are recoded for the lexer buffer, according to how the buffer is currently |
110
|
|
|
|
|
|
|
being interpreted (L). If a string to be interpreted is |
111
|
|
|
|
|
|
|
not already a Perl scalar, the L function avoids the |
112
|
|
|
|
|
|
|
need to construct a scalar. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
115
|
|
|
|
|
|
|
removed without notice. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
void lex_stuff_sv(SV *sv, U32 flags)','name' => 'lex_stuff_sv'},'CvSTASH' => {'text' => 'Returns the stash of the CV. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
HV* CvSTASH(CV* cv)','name' => 'CvSTASH'},'gv_const_sv' => {'text' => 'If C is a typeglob whose subroutine entry is a constant sub eligible for |
120
|
|
|
|
|
|
|
inlining, or C is a placeholder reference that would be promoted to such |
121
|
|
|
|
|
|
|
a typeglob, then returns the value returned by the sub. Otherwise, returns |
122
|
|
|
|
|
|
|
NULL. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
SV* gv_const_sv(GV* gv)','name' => 'gv_const_sv'},'sv_replace' => {'text' => 'Make the first argument a copy of the second, then delete the original. |
125
|
|
|
|
|
|
|
The target SV physically takes over ownership of the body of the source SV |
126
|
|
|
|
|
|
|
and inherits its flags; however, the target keeps any magic it owns, |
127
|
|
|
|
|
|
|
and any magic in the source is discarded. |
128
|
|
|
|
|
|
|
Note that this is a rather specialist SV copying operation; most of the |
129
|
|
|
|
|
|
|
time you\'ll want to use C or one of its many macro front-ends. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
void sv_replace(SV *const sv, SV *const nsv)','name' => 'sv_replace'},'utf8n_to_uvchr' => {'text' => 'flags |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Returns the native character value of the first character in the string |
134
|
|
|
|
|
|
|
C |
135
|
|
|
|
|
|
|
which is assumed to be in UTF-8 encoding; C will be set to the |
136
|
|
|
|
|
|
|
length, in bytes, of that character. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Allows length and flags to be passed to low level routine. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)','name' => 'utf8n_to_uvchr'},'G_ARRAY' => {'text' => 'Used to indicate list context. See C, C and |
141
|
|
|
|
|
|
|
L.','name' => 'G_ARRAY'},'sv_2iv' => {'text' => '','name' => 'sv_2iv'},'ck_warner_d' => {'text' => '','name' => 'ck_warner_d'},'XS_VERSION_BOOTCHECK' => {'text' => 'Macro to verify that a PM module\'s $VERSION variable matches the XS |
142
|
|
|
|
|
|
|
module\'s C variable. This is usually handled automatically by |
143
|
|
|
|
|
|
|
C. See L. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK;','name' => 'XS_VERSION_BOOTCHECK'},'mXPUSHn' => {'text' => 'Push a double onto the stack, extending the stack if necessary. |
146
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
void mXPUSHn(NV nv)','name' => 'mXPUSHn'},'SvSETMAGIC' => {'text' => 'Invokes C on an SV if it has \'set\' magic. This macro evaluates its |
149
|
|
|
|
|
|
|
argument more than once. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
void SvSETMAGIC(SV* sv)','name' => 'SvSETMAGIC'},'G_EVAL' => {'text' => 'Used to force a Perl C wrapper around a callback. See |
152
|
|
|
|
|
|
|
L.','name' => 'G_EVAL'},'is_utf8_punct' => {'text' => '','name' => 'is_utf8_punct'},'sv_catsv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
void sv_catsv_mg(SV *dsv, SV *ssv)','name' => 'sv_catsv_mg'},'call_argv' => {'text' => 'Performs a callback to the specified Perl sub. See L. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
I32 call_argv(const char* sub_name, I32 flags, char** argv)','name' => 'call_argv'},'SvPV_nolen' => {'text' => 'Returns a pointer to the string in the SV, or a stringified form of |
159
|
|
|
|
|
|
|
the SV if the SV does not contain a string. The SV may cache the |
160
|
|
|
|
|
|
|
stringified form becoming C. Handles \'get\' magic. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
char* SvPV_nolen(SV* sv)','name' => 'SvPV_nolen'},'perl_clone' => {'text' => 'Create and return a new interpreter by cloning the current one. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
perl_clone takes these flags as parameters: |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
CLONEf_COPY_STACKS - is used to, well, copy the stacks also, |
167
|
|
|
|
|
|
|
without it we only clone the data and zero the stacks, |
168
|
|
|
|
|
|
|
with it we copy the stacks and the new perl interpreter is |
169
|
|
|
|
|
|
|
ready to run at the exact same point as the previous one. |
170
|
|
|
|
|
|
|
The pseudo-fork code uses COPY_STACKS while the |
171
|
|
|
|
|
|
|
threads->create doesn\'t. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
CLONEf_KEEP_PTR_TABLE |
174
|
|
|
|
|
|
|
perl_clone keeps a ptr_table with the pointer of the old |
175
|
|
|
|
|
|
|
variable as a key and the new variable as a value, |
176
|
|
|
|
|
|
|
this allows it to check if something has been cloned and not |
177
|
|
|
|
|
|
|
clone it again but rather just use the value and increase the |
178
|
|
|
|
|
|
|
refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill |
179
|
|
|
|
|
|
|
the ptr_table using the function |
180
|
|
|
|
|
|
|
C, |
181
|
|
|
|
|
|
|
reason to keep it around is if you want to dup some of your own |
182
|
|
|
|
|
|
|
variable who are outside the graph perl scans, example of this |
183
|
|
|
|
|
|
|
code is in threads.xs create |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
CLONEf_CLONE_HOST |
186
|
|
|
|
|
|
|
This is a win32 thing, it is ignored on unix, it tells perls |
187
|
|
|
|
|
|
|
win32host code (which is c++) to clone itself, this is needed on |
188
|
|
|
|
|
|
|
win32 if you want to run two threads at the same time, |
189
|
|
|
|
|
|
|
if you just want to do some stuff in a separate perl interpreter |
190
|
|
|
|
|
|
|
and then throw it away and return to the original one, |
191
|
|
|
|
|
|
|
you don\'t need to do anything. |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
PerlInterpreter* perl_clone(PerlInterpreter *proto_perl, UV flags)','name' => 'perl_clone'},'sv_2nv' => {'text' => 'Return the num value of an SV, doing any necessary string or integer |
194
|
|
|
|
|
|
|
conversion, magic etc. Normally used via the C and C |
195
|
|
|
|
|
|
|
macros. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
NV sv_2nv(SV *const sv)','name' => 'sv_2nv'},'save_alloc' => {'text' => '','name' => 'save_alloc'},'SvSetSV' => {'text' => 'Calls C if dsv is not the same as ssv. May evaluate arguments |
198
|
|
|
|
|
|
|
more than once. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
void SvSetSV(SV* dsb, SV* ssv)','name' => 'SvSetSV'},'rninstr' => {'text' => '','name' => 'rninstr'},'hv_fetchs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
SV** hv_fetchs(HV* tb, const char* key, I32 lval)','name' => 'hv_fetchs'},'strnNE' => {'text' => 'Test two strings to see if they are different. The C parameter |
203
|
|
|
|
|
|
|
indicates the number of bytes to compare. Returns true or false. (A |
204
|
|
|
|
|
|
|
wrapper for C). |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
bool strnNE(char* s1, char* s2, STRLEN len)','name' => 'strnNE'},'savepv' => {'text' => 'Perl\'s version of C. Returns a pointer to a newly allocated |
207
|
|
|
|
|
|
|
string which is a duplicate of C. The size of the string is |
208
|
|
|
|
|
|
|
determined by C. The memory allocated for the new string can |
209
|
|
|
|
|
|
|
be freed with the C function. |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
char* savepv(const char* pv)','name' => 'savepv'},'save_iv' => {'text' => '','name' => 'save_iv'},'HvNAME' => {'text' => 'Returns the package name of a stash, or NULL if C isn\'t a stash. |
212
|
|
|
|
|
|
|
See C, C. |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
char* HvNAME(HV* stash)','name' => 'HvNAME'},'sv_recode_to_utf8' => {'text' => 'The encoding is assumed to be an Encode object, on entry the PV |
215
|
|
|
|
|
|
|
of the sv is assumed to be octets in that encoding, and the sv |
216
|
|
|
|
|
|
|
will be converted into Unicode (and UTF-8). |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
If the sv already is UTF-8 (or if it is not POK), or if the encoding |
219
|
|
|
|
|
|
|
is not a reference, nothing is done to the sv. If the encoding is not |
220
|
|
|
|
|
|
|
an C Encoding object, bad things will happen. |
221
|
|
|
|
|
|
|
(See F and L). |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
The PV of the sv is returned. |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
char* sv_recode_to_utf8(SV* sv, SV *encoding)','name' => 'sv_recode_to_utf8'},'save_hptr' => {'text' => '','name' => 'save_hptr'},'runops_debug' => {'text' => '','name' => 'runops_debug'},'do_gvgv_dump' => {'text' => '','name' => 'do_gvgv_dump'},'PERL_SYS_INIT' => {'text' => 'Provides system-specific tune up of the C runtime environment necessary to |
226
|
|
|
|
|
|
|
run Perl interpreters. This should be called only once, before creating |
227
|
|
|
|
|
|
|
any Perl interpreters. |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
void PERL_SYS_INIT(int argc, char** argv)','name' => 'PERL_SYS_INIT'},'vstringify' => {'text' => 'In order to maintain maximum compatibility with earlier versions |
230
|
|
|
|
|
|
|
of Perl, this function will return either the floating point |
231
|
|
|
|
|
|
|
notation or the multiple dotted notation, depending on whether |
232
|
|
|
|
|
|
|
the original version contained 1 or more dots, respectively |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
SV* vstringify(SV *vs)','name' => 'vstringify'},'sv_catsv_flags' => {'text' => 'Concatenates the string from SV C onto the end of the string in |
235
|
|
|
|
|
|
|
SV C. Modifies C but not C. If C has C |
236
|
|
|
|
|
|
|
bit set, will C on the SVs if appropriate, else not. C |
237
|
|
|
|
|
|
|
and C are implemented in terms of this function. |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
void sv_catsv_flags(SV *const dsv, SV *const ssv, const I32 flags)','name' => 'sv_catsv_flags'},'is_uni_alpha' => {'text' => '','name' => 'is_uni_alpha'},'str_to_version' => {'text' => '','name' => 'str_to_version'},'sv_derived_from' => {'text' => 'Returns a boolean indicating whether the SV is derived from the specified class |
240
|
|
|
|
|
|
|
I. To check derivation at the Perl level, call C as a |
241
|
|
|
|
|
|
|
normal Perl method. |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
bool sv_derived_from(SV* sv, const char *const name)','name' => 'sv_derived_from'},'SvIOK_on' => {'text' => 'Tells an SV that it is an integer. |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
void SvIOK_on(SV* sv)','name' => 'SvIOK_on'},'sv_cmp_locale' => {'text' => 'Compares the strings in two SVs in a locale-aware manner. Is UTF-8 and |
246
|
|
|
|
|
|
|
\'use bytes\' aware, handles get magic, and will coerce its args to strings |
247
|
|
|
|
|
|
|
if necessary. See also C. |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
I32 sv_cmp_locale(SV *const sv1, SV *const sv2)','name' => 'sv_cmp_locale'},'sv_catpvs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
void sv_catpvs(SV* sv, const char* s)','name' => 'sv_catpvs'},'set_numeric_standard' => {'text' => '','name' => 'set_numeric_standard'},'dSP' => {'text' => 'Declares a local copy of perl\'s stack pointer for the XSUB, available via |
252
|
|
|
|
|
|
|
the C macro. See C. |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
dSP;','name' => 'dSP'},'Nullsv' => {'text' => 'Null SV pointer. (No longer available when C is defined.)','name' => 'Nullsv'},'scan_vstring' => {'text' => '','name' => 'scan_vstring'},'ptr_table_new' => {'text' => '','name' => 'ptr_table_new'},'do_op_dump' => {'text' => '','name' => 'do_op_dump'},'PerlIO_get_base' => {'text' => '','name' => 'PerlIO_get_base'},'SvPVX' => {'text' => 'Returns a pointer to the physical string in the SV. The SV must contain a |
255
|
|
|
|
|
|
|
string. |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
char* SvPVX(SV* sv)','name' => 'SvPVX'},'XPUSHi' => {'text' => 'Push an integer onto the stack, extending the stack if necessary. Handles |
258
|
|
|
|
|
|
|
\'set\' magic. Uses C, so C or C should be called to |
259
|
|
|
|
|
|
|
declare it. Do not call multiple C-oriented macros to return lists |
260
|
|
|
|
|
|
|
from XSUB\'s - see C instead. See also C and C. |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
void XPUSHi(IV iv)','name' => 'XPUSHi'},'is_utf8_perl_word' => {'text' => '','name' => 'is_utf8_perl_word'},'debop' => {'text' => '','name' => 'debop'},'ref' => {'text' => '','name' => 'ref'},'is_uni_print_lc' => {'text' => '','name' => 'is_uni_print_lc'},'SvOOK_offset' => {'text' => 'Reads into I the offset from SvPVX back to the true start of the |
263
|
|
|
|
|
|
|
allocated buffer, which will be non-zero if C has been used to |
264
|
|
|
|
|
|
|
efficiently remove characters from start of the buffer. Implemented as a |
265
|
|
|
|
|
|
|
macro, which takes the address of I, which must be of type C. |
266
|
|
|
|
|
|
|
Evaluates I more than once. Sets I to 0 if C is false. |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
void SvOOK_offset(NN SV*sv, STRLEN len)','name' => 'SvOOK_offset'},'save_list' => {'text' => '','name' => 'save_list'},'is_uni_idfirst_lc' => {'text' => '','name' => 'is_uni_idfirst_lc'},'newGIVENOP' => {'text' => '','name' => 'newGIVENOP'},'SvTAINTED_on' => {'text' => 'Marks an SV as tainted if tainting is enabled. |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
void SvTAINTED_on(SV* sv)','name' => 'SvTAINTED_on'},'sv_nolocking' => {'text' => 'Dummy routine which "locks" an SV when there is no locking module present. |
271
|
|
|
|
|
|
|
Exists to avoid test for a NULL function pointer and because it could |
272
|
|
|
|
|
|
|
potentially warn under some level of strict-ness. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
"Superseded" by sv_nosharing(). |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
void sv_nolocking(SV *sv)','name' => 'sv_nolocking'},'ibcmp' => {'text' => '','name' => 'ibcmp'},'Slab_Alloc' => {'text' => '','name' => 'Slab_Alloc'},'strLT' => {'text' => 'Test two strings to see if the first, C, is less than the second, |
277
|
|
|
|
|
|
|
C. Returns true or false. |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
bool strLT(char* s1, char* s2)','name' => 'strLT'},'save_pushptr' => {'text' => '','name' => 'save_pushptr'},'save_clearsv' => {'text' => '','name' => 'save_clearsv'},'Slab_Free' => {'text' => '','name' => 'Slab_Free'},'av_shift' => {'text' => 'Shifts an SV off the beginning of the array. Returns C<&PL_sv_undef> if the |
280
|
|
|
|
|
|
|
array is empty. |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
SV* av_shift(AV *av)','name' => 'av_shift'},'sv_setpvf_nocontext' => {'text' => '','name' => 'sv_setpvf_nocontext'},'sv_nounlocking' => {'text' => 'Dummy routine which "unlocks" an SV when there is no locking module present. |
283
|
|
|
|
|
|
|
Exists to avoid test for a NULL function pointer and because it could |
284
|
|
|
|
|
|
|
potentially warn under some level of strict-ness. |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
"Superseded" by sv_nosharing(). |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
void sv_nounlocking(SV *sv)','name' => 'sv_nounlocking'},'perl_clone_using' => {'text' => '','name' => 'perl_clone_using'},'PerlIO_context_layers' => {'text' => '','name' => 'PerlIO_context_layers'},'lex_unstuff' => {'text' => 'Discards text about to be lexed, from Lbufptr> up to |
289
|
|
|
|
|
|
|
I. Text following I will be moved, and the buffer shortened. |
290
|
|
|
|
|
|
|
This hides the discarded text from any lexing code that runs later, |
291
|
|
|
|
|
|
|
as if the text had never appeared. |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
This is not the normal way to consume lexed text. For that, use |
294
|
|
|
|
|
|
|
L. |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
297
|
|
|
|
|
|
|
removed without notice. |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
void lex_unstuff(char *ptr)','name' => 'lex_unstuff'},'newSVpvf_nocontext' => {'text' => '','name' => 'newSVpvf_nocontext'},'SvUV_set' => {'text' => 'Set the value of the UV pointer in sv to val. See C. |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
void SvUV_set(SV* sv, UV val)','name' => 'SvUV_set'},'rvpv_dup' => {'text' => '','name' => 'rvpv_dup'},'filter_read' => {'text' => '','name' => 'filter_read'},'ckwarn' => {'text' => '','name' => 'ckwarn'},'warner' => {'text' => '','name' => 'warner'},'CopyD' => {'text' => 'Like C but returns dest. Useful for encouraging compilers to tail-call |
302
|
|
|
|
|
|
|
optimise. |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
void * CopyD(void* src, void* dest, int nitems, type)','name' => 'CopyD'},'sv_setiv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
void sv_setiv_mg(SV *const sv, const IV i)','name' => 'sv_setiv_mg'},'newFOROP' => {'text' => '','name' => 'newFOROP'},'save_generic_svref' => {'text' => '','name' => 'save_generic_svref'},'savesharedpvn' => {'text' => 'A version of C which allocates the duplicate string in memory |
307
|
|
|
|
|
|
|
which is shared between threads. (With the specific difference that a NULL |
308
|
|
|
|
|
|
|
pointer is not acceptable) |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
char* savesharedpvn(const char *const pv, const STRLEN len)','name' => 'savesharedpvn'},'SvCUR_set' => {'text' => 'Set the current length of the string which is in the SV. See C |
311
|
|
|
|
|
|
|
and C. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
void SvCUR_set(SV* sv, STRLEN len)','name' => 'SvCUR_set'},'sv_2pv' => {'text' => '','name' => 'sv_2pv'},'SvNOK' => {'text' => 'Returns a U32 value indicating whether the SV contains a double. |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
U32 SvNOK(SV* sv)','name' => 'SvNOK'},'mPUSHn' => {'text' => 'Push a double onto the stack. The stack must have room for this element. |
316
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
void mPUSHn(NV nv)','name' => 'mPUSHn'},'is_uni_digit_lc' => {'text' => '','name' => 'is_uni_digit_lc'},'sv_reset' => {'text' => 'Underlying implementation for the C Perl function. |
319
|
|
|
|
|
|
|
Note that the perl-level function is vaguely deprecated. |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
void sv_reset(const char* s, HV *const stash)','name' => 'sv_reset'},'sv_2pv_flags' => {'text' => 'Returns a pointer to the string value of an SV, and sets *lp to its length. |
322
|
|
|
|
|
|
|
If flags includes SV_GMAGIC, does an mg_get() first. Coerces sv to a string |
323
|
|
|
|
|
|
|
if necessary. |
324
|
|
|
|
|
|
|
Normally invoked via the C macro. C and C |
325
|
|
|
|
|
|
|
usually end up here too. |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
char* sv_2pv_flags(SV *const sv, STRLEN *const lp, const I32 flags)','name' => 'sv_2pv_flags'},'push_scope' => {'text' => '','name' => 'push_scope'},'SvNVx' => {'text' => 'Coerces the given SV to a double and returns it. Guarantees to evaluate |
328
|
|
|
|
|
|
|
C only once. Only use this if C is an expression with side effects, |
329
|
|
|
|
|
|
|
otherwise use the more efficient C. |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
NV SvNVx(SV* sv)','name' => 'SvNVx'},'setdefout' => {'text' => 'Sets PL_defoutgv, the default file handle for output, to the passed in |
332
|
|
|
|
|
|
|
typeglob. As PL_defoutgv "owns" a reference on its typeglob, the reference |
333
|
|
|
|
|
|
|
count of the passed in typeglob is increased by one, and the reference count |
334
|
|
|
|
|
|
|
of the typeglob that PL_defoutgv points to is decreased by one. |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
void setdefout(GV* gv)','name' => 'setdefout'},'form_nocontext' => {'text' => '','name' => 'form_nocontext'},'hv_store' => {'text' => 'Stores an SV in a hash. The hash key is specified as C and C is |
337
|
|
|
|
|
|
|
the length of the key. The C parameter is the precomputed hash |
338
|
|
|
|
|
|
|
value; if it is zero then Perl will compute it. The return value will be |
339
|
|
|
|
|
|
|
NULL if the operation failed or if the value did not need to be actually |
340
|
|
|
|
|
|
|
stored within the hash (as in the case of tied hashes). Otherwise it can |
341
|
|
|
|
|
|
|
be dereferenced to get the original C. Note that the caller is |
342
|
|
|
|
|
|
|
responsible for suitably incrementing the reference count of C before |
343
|
|
|
|
|
|
|
the call, and decrementing it if the function returned NULL. Effectively |
344
|
|
|
|
|
|
|
a successful hv_store takes ownership of one reference to C. This is |
345
|
|
|
|
|
|
|
usually what you want; a newly created SV has a reference count of one, so |
346
|
|
|
|
|
|
|
if all your code does is create SVs then store them in a hash, hv_store |
347
|
|
|
|
|
|
|
will own the only reference to the new SV, and your code doesn\'t need to do |
348
|
|
|
|
|
|
|
anything further to tidy up. hv_store is not implemented as a call to |
349
|
|
|
|
|
|
|
hv_store_ent, and does not create a temporary SV for the key, so if your |
350
|
|
|
|
|
|
|
key data is not already in SV form then use hv_store in preference to |
351
|
|
|
|
|
|
|
hv_store_ent. |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
See L for more |
354
|
|
|
|
|
|
|
information on how to use this function on tied hashes. |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
SV** hv_store(HV *hv, const char *key, I32 klen, SV *val, U32 hash)','name' => 'hv_store'},'sys_intern_dup' => {'text' => '','name' => 'sys_intern_dup'},'do_binmode' => {'text' => '','name' => 'do_binmode'},'get_op_names' => {'text' => '','name' => 'get_op_names'},'op_null' => {'text' => '','name' => 'op_null'},'hv_fetch_ent' => {'text' => 'Returns the hash entry which corresponds to the specified key in the hash. |
357
|
|
|
|
|
|
|
C must be a valid precomputed hash number for the given C, or 0 |
358
|
|
|
|
|
|
|
if you want the function to compute it. IF C is set then the fetch |
359
|
|
|
|
|
|
|
will be part of a store. Make sure the return value is non-null before |
360
|
|
|
|
|
|
|
accessing it. The return value when C is a tied hash is a pointer to a |
361
|
|
|
|
|
|
|
static location, so be sure to make a copy of the structure if you need to |
362
|
|
|
|
|
|
|
store it somewhere. |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
See L for more |
365
|
|
|
|
|
|
|
information on how to use this function on tied hashes. |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
HE* hv_fetch_ent(HV *hv, SV *keysv, I32 lval, U32 hash)','name' => 'hv_fetch_ent'},'gv_fetchpvn_flags' => {'text' => '','name' => 'gv_fetchpvn_flags'},'ENTER' => {'text' => 'Opening bracket on a callback. See C and L. |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
ENTER;','name' => 'ENTER'},'PL_sv_no' => {'text' => 'This is the C SV. See C. Always refer to this as |
370
|
|
|
|
|
|
|
C<&PL_sv_no>. |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
SV PL_sv_no','name' => 'PL_sv_no'},'Newx' => {'text' => 'The XSUB-writer\'s interface to the C C function. |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
In 5.9.3, Newx() and friends replace the older New() API, and drops |
375
|
|
|
|
|
|
|
the first parameter, I, a debug aid which allowed callers to identify |
376
|
|
|
|
|
|
|
themselves. This aid has been superseded by a new build option, |
377
|
|
|
|
|
|
|
PERL_MEM_LOG (see L). The older API is still |
378
|
|
|
|
|
|
|
there for use in XS modules supporting older perls. |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
void Newx(void* ptr, int nitems, type)','name' => 'Newx'},'newFORM' => {'text' => '','name' => 'newFORM'},'PUSHs' => {'text' => 'Push an SV onto the stack. The stack must have room for this element. |
381
|
|
|
|
|
|
|
Does not handle \'set\' magic. Does not use C. See also C, |
382
|
|
|
|
|
|
|
C and C. |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
void PUSHs(SV* sv)','name' => 'PUSHs'},'to_uni_upper_lc' => {'text' => '','name' => 'to_uni_upper_lc'},'sv_setuv' => {'text' => 'Copies an unsigned integer into the given SV, upgrading first if necessary. |
385
|
|
|
|
|
|
|
Does not handle \'set\' magic. See also C. |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
void sv_setuv(SV *const sv, const UV num)','name' => 'sv_setuv'},'SvUPGRADE' => {'text' => 'Used to upgrade an SV to a more complex form. Uses C to |
388
|
|
|
|
|
|
|
perform the upgrade if necessary. See C. |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
void SvUPGRADE(SV* sv, svtype type)','name' => 'SvUPGRADE'},'is_uni_upper_lc' => {'text' => '','name' => 'is_uni_upper_lc'},'do_aspawn' => {'text' => '','name' => 'do_aspawn'},'sv_pvn' => {'text' => 'A private implementation of the C macro for compilers which can\'t |
391
|
|
|
|
|
|
|
cope with complex macro expressions. Always use the macro instead. |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
char* sv_pvn(SV *sv, STRLEN *lp)','name' => 'sv_pvn'},'do_openn' => {'text' => '','name' => 'do_openn'},'mro_get_from_name' => {'text' => '','name' => 'mro_get_from_name'},'sv_setref_iv' => {'text' => 'Copies an integer into a new SV, optionally blessing the SV. The C |
394
|
|
|
|
|
|
|
argument will be upgraded to an RV. That RV will be modified to point to |
395
|
|
|
|
|
|
|
the new SV. The C argument indicates the package for the |
396
|
|
|
|
|
|
|
blessing. Set C to C to avoid the blessing. The new SV |
397
|
|
|
|
|
|
|
will have a reference count of 1, and the RV will be returned. |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
SV* sv_setref_iv(SV *const rv, const char *const classname, const IV iv)','name' => 'sv_setref_iv'},'sv_chop' => {'text' => 'Efficient removal of characters from the beginning of the string buffer. |
400
|
|
|
|
|
|
|
SvPOK(sv) must be true and the C must be a pointer to somewhere inside |
401
|
|
|
|
|
|
|
the string buffer. The C becomes the first character of the adjusted |
402
|
|
|
|
|
|
|
string. Uses the "OOK hack". |
403
|
|
|
|
|
|
|
Beware: after this function returns, C and SvPVX_const(sv) may no longer |
404
|
|
|
|
|
|
|
refer to the same chunk of data. |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
void sv_chop(SV *const sv, const char *const ptr)','name' => 'sv_chop'},'sv_backoff' => {'text' => 'Remove any string offset. You should normally use the C macro |
407
|
|
|
|
|
|
|
wrapper instead. |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
int sv_backoff(SV *const sv)','name' => 'sv_backoff'},'reentrant_retry' => {'text' => '','name' => 'reentrant_retry'},'XPUSHu' => {'text' => 'Push an unsigned integer onto the stack, extending the stack if necessary. |
410
|
|
|
|
|
|
|
Handles \'set\' magic. Uses C, so C or C should be |
411
|
|
|
|
|
|
|
called to declare it. Do not call multiple C-oriented macros to |
412
|
|
|
|
|
|
|
return lists from XSUB\'s - see C instead. See also C and |
413
|
|
|
|
|
|
|
C. |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
void XPUSHu(UV uv)','name' => 'XPUSHu'},'sv_pvn_nomg' => {'text' => '','name' => 'sv_pvn_nomg'},'is_uni_space_lc' => {'text' => '','name' => 'is_uni_space_lc'},'stack_grow' => {'text' => '','name' => 'stack_grow'},'dump_mstats' => {'text' => '','name' => 'dump_mstats'},'newLOOPEX' => {'text' => '','name' => 'newLOOPEX'},'save_shared_pvref' => {'text' => '','name' => 'save_shared_pvref'},'PL_na' => {'text' => 'A convenience variable which is typically used with C when one |
416
|
|
|
|
|
|
|
doesn\'t care about the length of the string. It is usually more efficient |
417
|
|
|
|
|
|
|
to either declare a local variable and use that instead or to use the |
418
|
|
|
|
|
|
|
C macro. |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
STRLEN PL_na','name' => 'PL_na'},'newSViv' => {'text' => 'Creates a new SV and copies an integer into it. The reference count for the |
421
|
|
|
|
|
|
|
SV is set to 1. |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
SV* newSViv(const IV i)','name' => 'newSViv'},'gv_name_set' => {'text' => '','name' => 'gv_name_set'},'sv_untaint' => {'text' => 'Untaint an SV. Use C instead. |
424
|
|
|
|
|
|
|
void sv_untaint(SV *const sv)','name' => 'sv_untaint'},'Newxz' => {'text' => 'The XSUB-writer\'s interface to the C C function. The allocated |
425
|
|
|
|
|
|
|
memory is zeroed with C. See also C. |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
void Newxz(void* ptr, int nitems, type)','name' => 'Newxz'},'SVt_PVHV' => {'text' => 'Type flag for hashes. See C.','name' => 'SVt_PVHV'},'reentrant_init' => {'text' => '','name' => 'reentrant_init'},'save_gp' => {'text' => '','name' => 'save_gp'},'SvRX' => {'text' => 'Convenience macro to get the REGEXP from a SV. This is approximately |
428
|
|
|
|
|
|
|
equivalent to the following snippet: |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
if (SvMAGICAL(sv)) |
431
|
|
|
|
|
|
|
mg_get(sv); |
432
|
|
|
|
|
|
|
if (SvROK(sv) && |
433
|
|
|
|
|
|
|
(tmpsv = (SV*)SvRV(sv)) && |
434
|
|
|
|
|
|
|
SvTYPE(tmpsv) == SVt_PVMG && |
435
|
|
|
|
|
|
|
(tmpmg = mg_find(tmpsv, PERL_MAGIC_qr))) |
436
|
|
|
|
|
|
|
{ |
437
|
|
|
|
|
|
|
return (REGEXP *)tmpmg->mg_obj; |
438
|
|
|
|
|
|
|
} |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
NULL will be returned if a REGEXP* is not found. |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
REGEXP * SvRX(SV *sv)','name' => 'SvRX'},'newASSIGNOP' => {'text' => '','name' => 'newASSIGNOP'},'hv_undef' => {'text' => 'Undefines the hash. |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
void hv_undef(HV *hv)','name' => 'hv_undef'},'SvSetMagicSV_nosteal' => {'text' => 'Like C, but does any set magic required afterwards. |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
void SvSetMagicSV_nosteal(SV* dsv, SV* ssv)','name' => 'SvSetMagicSV_nosteal'},'sv_isobject' => {'text' => 'Returns a boolean indicating whether the SV is an RV pointing to a blessed |
447
|
|
|
|
|
|
|
object. If the SV is not an RV, or if the object is not blessed, then this |
448
|
|
|
|
|
|
|
will return false. |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
int sv_isobject(SV* sv)','name' => 'sv_isobject'},'gv_efullname4' => {'text' => '','name' => 'gv_efullname4'},'SvIV' => {'text' => 'Coerces the given SV to an integer and returns it. See C for a |
451
|
|
|
|
|
|
|
version which guarantees to evaluate sv only once. |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
IV SvIV(SV* sv)','name' => 'SvIV'},'PerlIO_eof' => {'text' => '','name' => 'PerlIO_eof'},'sv_setref_uv' => {'text' => 'Copies an unsigned integer into a new SV, optionally blessing the SV. The C |
454
|
|
|
|
|
|
|
argument will be upgraded to an RV. That RV will be modified to point to |
455
|
|
|
|
|
|
|
the new SV. The C argument indicates the package for the |
456
|
|
|
|
|
|
|
blessing. Set C to C to avoid the blessing. The new SV |
457
|
|
|
|
|
|
|
will have a reference count of 1, and the RV will be returned. |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
SV* sv_setref_uv(SV *const rv, const char *const classname, const UV uv)','name' => 'sv_setref_uv'},'get_ppaddr' => {'text' => '','name' => 'get_ppaddr'},'getcwd_sv' => {'text' => 'Fill the sv with current working directory |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
int getcwd_sv(SV* sv)','name' => 'getcwd_sv'},'newSVpvs_share' => {'text' => 'Like C, but takes a literal string instead of a string/length |
462
|
|
|
|
|
|
|
pair and omits the hash parameter. |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
SV* newSVpvs_share(const char* s)','name' => 'newSVpvs_share'},'newSVpv' => {'text' => 'Creates a new SV and copies a string into it. The reference count for the |
465
|
|
|
|
|
|
|
SV is set to 1. If C is zero, Perl will compute the length using |
466
|
|
|
|
|
|
|
strlen(). For efficiency, consider using C instead. |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
SV* newSVpv(const char *const s, const STRLEN len)','name' => 'newSVpv'},'sv_2pvbyte' => {'text' => 'Return a pointer to the byte-encoded representation of the SV, and set *lp |
469
|
|
|
|
|
|
|
to its length. May cause the SV to be downgraded from UTF-8 as a |
470
|
|
|
|
|
|
|
side-effect. |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
Usually accessed via the C macro. |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
char* sv_2pvbyte(SV *const sv, STRLEN *const lp)','name' => 'sv_2pvbyte'},'fbm_instr' => {'text' => 'Returns the location of the SV in the string delimited by C and |
475
|
|
|
|
|
|
|
C. It returns C if the string can\'t be found. The C |
476
|
|
|
|
|
|
|
does not have to be fbm_compiled, but the search will not be as fast |
477
|
|
|
|
|
|
|
then. |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
char* fbm_instr(unsigned char* big, unsigned char* bigend, SV* littlestr, U32 flags)','name' => 'fbm_instr'},'XPUSHn' => {'text' => 'Push a double onto the stack, extending the stack if necessary. Handles |
480
|
|
|
|
|
|
|
\'set\' magic. Uses C, so C or C should be called to |
481
|
|
|
|
|
|
|
declare it. Do not call multiple C-oriented macros to return lists |
482
|
|
|
|
|
|
|
from XSUB\'s - see C instead. See also C and C. |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
void XPUSHn(NV nv)','name' => 'XPUSHn'},'PL_opfreehook' => {'text' => 'When non-C, the function pointed by this variable will be called each time an OP is freed with the corresponding OP as the argument. |
485
|
|
|
|
|
|
|
This allows extensions to free any extra attribute they have locally attached to an OP. |
486
|
|
|
|
|
|
|
It is also assured to first fire for the parent OP and then for its kids. |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own. |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
Perl_ophook_t PL_opfreehook','name' => 'PL_opfreehook'},'dump_all' => {'text' => '','name' => 'dump_all'},'ninstr' => {'text' => '','name' => 'ninstr'},'sv_vcatpvf' => {'text' => 'Processes its arguments like C and appends the formatted output |
491
|
|
|
|
|
|
|
to an SV. Does not handle \'set\' magic. See C. |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
Usually used via its frontend C. |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
void sv_vcatpvf(SV *const sv, const char *const pat, va_list *const args)','name' => 'sv_vcatpvf'},'sv_pos_u2b' => {'text' => 'Converts the value pointed to by offsetp from a count of UTF-8 chars from |
496
|
|
|
|
|
|
|
the start of the string, to a count of the equivalent number of bytes; if |
497
|
|
|
|
|
|
|
lenp is non-zero, it does the same to lenp, but this time starting from |
498
|
|
|
|
|
|
|
the offset, rather than from the start of the string. Handles magic and |
499
|
|
|
|
|
|
|
type coercion. |
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
Use C in preference, which correctly handles strings longer |
502
|
|
|
|
|
|
|
than 2Gb. |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
void sv_pos_u2b(SV *const sv, I32 *const offsetp, I32 *const lenp)','name' => 'sv_pos_u2b'},'is_utf8_xdigit' => {'text' => '','name' => 'is_utf8_xdigit'},'PERL_SYS_INIT3' => {'text' => 'Provides system-specific tune up of the C runtime environment necessary to |
505
|
|
|
|
|
|
|
run Perl interpreters. This should be called only once, before creating |
506
|
|
|
|
|
|
|
any Perl interpreters. |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
void PERL_SYS_INIT3(int argc, char** argv, char** env)','name' => 'PERL_SYS_INIT3'},'upg_version' => {'text' => 'In-place upgrade of the supplied SV to a version object. |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
SV *sv = upg_version(SV *sv, bool qv); |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
Returns a pointer to the upgraded SV. Set the boolean qv if you want |
513
|
|
|
|
|
|
|
to force this SV to be interpreted as an "extended" version. |
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
SV* upg_version(SV *ver, bool qv)','name' => 'upg_version'},'HeSVKEY_set' => {'text' => 'Sets the key to a given C, taking care to set the appropriate flags to |
516
|
|
|
|
|
|
|
indicate the presence of an C key, and returns the same |
517
|
|
|
|
|
|
|
C. |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
SV* HeSVKEY_set(HE* he, SV* sv)','name' => 'HeSVKEY_set'},'is_utf8_perl_space' => {'text' => '','name' => 'is_utf8_perl_space'},'SPAGAIN' => {'text' => 'Refetch the stack pointer. Used after a callback. See L. |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
SPAGAIN;','name' => 'SPAGAIN'},'newCVREF' => {'text' => '','name' => 'newCVREF'},'my_bcopy' => {'text' => '','name' => 'my_bcopy'},'PL_parser-Ebufptr' => {'text' => 'Points to the current position of lexing inside the lexer buffer. |
522
|
|
|
|
|
|
|
Characters around this point may be freely examined, within |
523
|
|
|
|
|
|
|
the range delimited by Clinestr>)> and |
524
|
|
|
|
|
|
|
Lbufend>. The octets of the buffer may be intended to be |
525
|
|
|
|
|
|
|
interpreted as either UTF-8 or Latin-1, as indicated by L. |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
Lexing code (whether in the Perl core or not) moves this pointer past |
528
|
|
|
|
|
|
|
the characters that it consumes. It is also expected to perform some |
529
|
|
|
|
|
|
|
bookkeeping whenever a newline character is consumed. This movement |
530
|
|
|
|
|
|
|
can be more conveniently performed by the function L, |
531
|
|
|
|
|
|
|
which handles newlines appropriately. |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
Interpretation of the buffer\'s octets can be abstracted out by |
534
|
|
|
|
|
|
|
using the slightly higher-level functions L and |
535
|
|
|
|
|
|
|
L. |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
538
|
|
|
|
|
|
|
removed without notice.','name' => 'PL_parser-Ebufptr'},'G_NOARGS' => {'text' => 'Indicates that no arguments are being sent to a callback. See |
539
|
|
|
|
|
|
|
L.','name' => 'G_NOARGS'},'is_uni_ascii_lc' => {'text' => '','name' => 'is_uni_ascii_lc'},'hv_riter_set' => {'text' => '','name' => 'hv_riter_set'},'to_uni_lower' => {'text' => '','name' => 'to_uni_lower'},'dounwind' => {'text' => '','name' => 'dounwind'},'ptr_table_clear' => {'text' => '','name' => 'ptr_table_clear'},'uvchr_to_utf8_flags' => {'text' => '','name' => 'uvchr_to_utf8_flags'},'save_hash' => {'text' => '','name' => 'save_hash'},'sv_isa' => {'text' => 'Returns a boolean indicating whether the SV is blessed into the specified |
540
|
|
|
|
|
|
|
class. This does not check for subtypes; use C to verify |
541
|
|
|
|
|
|
|
an inheritance relationship. |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
int sv_isa(SV* sv, const char *const name)','name' => 'sv_isa'},'sv_catpvf' => {'text' => 'Processes its arguments like C and appends the formatted |
544
|
|
|
|
|
|
|
output to an SV. If the appended data contains "wide" characters |
545
|
|
|
|
|
|
|
(including, but not limited to, SVs with a UTF-8 PV formatted with %s, |
546
|
|
|
|
|
|
|
and characters >255 formatted with %c), the original SV might get |
547
|
|
|
|
|
|
|
upgraded to UTF-8. Handles \'get\' magic, but not \'set\' magic. See |
548
|
|
|
|
|
|
|
C. If the original SV was UTF-8, the pattern should be |
549
|
|
|
|
|
|
|
valid UTF-8; if the original SV was bytes, the pattern should be too. |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
void sv_catpvf(SV *const sv, const char *const pat, ...)','name' => 'sv_catpvf'},'XSRETURN_PV' => {'text' => 'Return a copy of a string from an XSUB immediately. Uses C. |
552
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
void XSRETURN_PV(char* str)','name' => 'XSRETURN_PV'},'utf8_to_uvuni' => {'text' => 'Returns the Unicode code point of the first character in the string C |
554
|
|
|
|
|
|
|
which is assumed to be in UTF-8 encoding; C will be set to the |
555
|
|
|
|
|
|
|
length, in bytes, of that character. |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
This function should only be used when the returned UV is considered |
558
|
|
|
|
|
|
|
an index into the Unicode semantic tables (e.g. swashes). |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
If C does not point to a well-formed UTF-8 character, zero is |
561
|
|
|
|
|
|
|
returned and retlen is set, if possible, to -1. |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
UV utf8_to_uvuni(const U8 *s, STRLEN *retlen)','name' => 'utf8_to_uvuni'},'is_utf8_idcont' => {'text' => '','name' => 'is_utf8_idcont'},'av_fill' => {'text' => 'Set the highest index in the array to the given number, equivalent to |
564
|
|
|
|
|
|
|
Perl\'s C<$#array = $fill;>. |
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
The number of elements in the an array will be C after |
567
|
|
|
|
|
|
|
av_fill() returns. If the array was previously shorter then the |
568
|
|
|
|
|
|
|
additional elements appended are set to C. If the array |
569
|
|
|
|
|
|
|
was longer, then the excess elements are freed. C is |
570
|
|
|
|
|
|
|
the same as C. |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
void av_fill(AV *av, I32 fill)','name' => 'av_fill'},'warn_nocontext' => {'text' => '','name' => 'warn_nocontext'},'my_swap' => {'text' => '','name' => 'my_swap'},'SvIOK_only' => {'text' => 'Tells an SV that it is an integer and disables all other OK bits. |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
void SvIOK_only(SV* sv)','name' => 'SvIOK_only'},'MoveD' => {'text' => 'Like C but returns dest. Useful for encouraging compilers to tail-call |
575
|
|
|
|
|
|
|
optimise. |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
void * MoveD(void* src, void* dest, int nitems, type)','name' => 'MoveD'},'gv_IOadd' => {'text' => '','name' => 'gv_IOadd'},'grok_bin' => {'text' => 'converts a string representing a binary number to numeric form. |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
On entry I and I<*len> give the string to scan, I<*flags> gives |
580
|
|
|
|
|
|
|
conversion flags, and I should be NULL or a pointer to an NV. |
581
|
|
|
|
|
|
|
The scan stops at the end of the string, or the first invalid character. |
582
|
|
|
|
|
|
|
Unless C is set in I<*flags>, encountering an |
583
|
|
|
|
|
|
|
invalid character will also trigger a warning. |
584
|
|
|
|
|
|
|
On return I<*len> is set to the length of the scanned string, |
585
|
|
|
|
|
|
|
and I<*flags> gives output flags. |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
If the value is <= C it is returned as a UV, the output flags are clear, |
588
|
|
|
|
|
|
|
and nothing is written to I<*result>. If the value is > UV_MAX C |
589
|
|
|
|
|
|
|
returns UV_MAX, sets C in the output flags, |
590
|
|
|
|
|
|
|
and writes the value to I<*result> (or the value is discarded if I |
591
|
|
|
|
|
|
|
is NULL). |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
The binary number may optionally be prefixed with "0b" or "b" unless |
594
|
|
|
|
|
|
|
C is set in I<*flags> on entry. If |
595
|
|
|
|
|
|
|
C is set in I<*flags> then the binary |
596
|
|
|
|
|
|
|
number may use \'_\' characters to separate digits. |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
UV grok_bin(const char* start, STRLEN* len_p, I32* flags, NV *result)','name' => 'grok_bin'},'cast_uv' => {'text' => '','name' => 'cast_uv'},'perl_free' => {'text' => 'Releases a Perl interpreter. See L. |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
void perl_free(PerlInterpreter *my_perl)','name' => 'perl_free'},'mg_find' => {'text' => 'Finds the magic pointer for type matching the SV. See C. |
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
MAGIC* mg_find(const SV* sv, int type)','name' => 'mg_find'},'safesysfree' => {'text' => '','name' => 'safesysfree'},'PL_parser-Elinestr' => {'text' => 'Buffer scalar containing the chunk currently under consideration of the |
603
|
|
|
|
|
|
|
text currently being lexed. This is always a plain string scalar (for |
604
|
|
|
|
|
|
|
which C is true). It is not intended to be used as a scalar by |
605
|
|
|
|
|
|
|
normal scalar means; instead refer to the buffer directly by the pointer |
606
|
|
|
|
|
|
|
variables described below. |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
The lexer maintains various C pointers to things in the |
609
|
|
|
|
|
|
|
Clinestr> buffer. If Clinestr> is ever |
610
|
|
|
|
|
|
|
reallocated, all of these pointers must be updated. Don\'t attempt to |
611
|
|
|
|
|
|
|
do this manually, but rather use L if you need to |
612
|
|
|
|
|
|
|
reallocate the buffer. |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
The content of the text chunk in the buffer is commonly exactly one |
615
|
|
|
|
|
|
|
complete line of input, up to and including a newline terminator, |
616
|
|
|
|
|
|
|
but there are situations where it is otherwise. The octets of the |
617
|
|
|
|
|
|
|
buffer may be intended to be interpreted as either UTF-8 or Latin-1. |
618
|
|
|
|
|
|
|
The function L tells you which. Do not use the C |
619
|
|
|
|
|
|
|
flag on this scalar, which may disagree with it. |
620
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
For direct examination of the buffer, the variable |
622
|
|
|
|
|
|
|
Lbufend> points to the end of the buffer. The current |
623
|
|
|
|
|
|
|
lexing position is pointed to by Lbufptr>. Direct use |
624
|
|
|
|
|
|
|
of these pointers is usually preferable to examination of the scalar |
625
|
|
|
|
|
|
|
through normal scalar means. |
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
628
|
|
|
|
|
|
|
removed without notice.','name' => 'PL_parser-Elinestr'},'hv_riter_p' => {'text' => '','name' => 'hv_riter_p'},'newSVpvn_share' => {'text' => 'Creates a new SV with its SvPVX_const pointing to a shared string in the string |
629
|
|
|
|
|
|
|
table. If the string does not already exist in the table, it is created |
630
|
|
|
|
|
|
|
first. Turns on READONLY and FAKE. If the C parameter is non-zero, that |
631
|
|
|
|
|
|
|
value is used; otherwise the hash is computed. The string\'s hash can be later |
632
|
|
|
|
|
|
|
be retrieved from the SV with the C macro. The idea here is |
633
|
|
|
|
|
|
|
that as the string table is used for shared hash keys these strings will have |
634
|
|
|
|
|
|
|
SvPVX_const == HeKEY and hash lookup will avoid string compare. |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
SV* newSVpvn_share(const char* s, I32 len, U32 hash)','name' => 'newSVpvn_share'},'mro_set_mro' => {'text' => '','name' => 'mro_set_mro'},'SvPOKp' => {'text' => 'Returns a U32 value indicating whether the SV contains a character string. |
637
|
|
|
|
|
|
|
Checks the B setting. Use C instead. |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
U32 SvPOKp(SV* sv)','name' => 'SvPOKp'},'pregfree2' => {'text' => '','name' => 'pregfree2'},'sv_catpvn' => {'text' => 'Concatenates the string onto the end of the string which is in the SV. The |
640
|
|
|
|
|
|
|
C indicates number of bytes to copy. If the SV has the UTF-8 |
641
|
|
|
|
|
|
|
status set, then the bytes appended should be valid UTF-8. |
642
|
|
|
|
|
|
|
Handles \'get\' magic, but not \'set\' magic. See C. |
643
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
void sv_catpvn(SV *dsv, const char *sstr, STRLEN len)','name' => 'sv_catpvn'},'my_socketpair' => {'text' => '','name' => 'my_socketpair'},'init_global_struct' => {'text' => '','name' => 'init_global_struct'},'sv_utf8_downgrade' => {'text' => 'Attempts to convert the PV of an SV from characters to bytes. |
645
|
|
|
|
|
|
|
If the PV contains a character that cannot fit |
646
|
|
|
|
|
|
|
in a byte, this conversion will fail; |
647
|
|
|
|
|
|
|
in this case, either returns false or, if C is not |
648
|
|
|
|
|
|
|
true, croaks. |
649
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
This is not as a general purpose Unicode to byte encoding interface: |
651
|
|
|
|
|
|
|
use the Encode extension for that. |
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
654
|
|
|
|
|
|
|
removed without notice. |
655
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
bool sv_utf8_downgrade(SV *const sv, const bool fail_ok)','name' => 'sv_utf8_downgrade'},'utf8_hop' => {'text' => 'Return the UTF-8 pointer C displaced by C characters, either |
657
|
|
|
|
|
|
|
forward or backward. |
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
WARNING: do not use the following unless you *know* C is within |
660
|
|
|
|
|
|
|
the UTF-8 data pointed to by C *and* that on entry C is aligned |
661
|
|
|
|
|
|
|
on the first byte of character or just after the last byte of a character. |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
U8* utf8_hop(const U8 *s, I32 off)','name' => 'utf8_hop'},'newPROG' => {'text' => '','name' => 'newPROG'},'sv_setref_pvn' => {'text' => 'Copies a string into a new SV, optionally blessing the SV. The length of the |
664
|
|
|
|
|
|
|
string must be specified with C. The C argument will be upgraded to |
665
|
|
|
|
|
|
|
an RV. That RV will be modified to point to the new SV. The C |
666
|
|
|
|
|
|
|
argument indicates the package for the blessing. Set C to |
667
|
|
|
|
|
|
|
C to avoid the blessing. The new SV will have a reference count |
668
|
|
|
|
|
|
|
of 1, and the RV will be returned. |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
Note that C copies the pointer while this copies the string. |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
SV* sv_setref_pvn(SV *const rv, const char *const classname, const char *const pv, const STRLEN n)','name' => 'sv_setref_pvn'},'SVt_PVMG' => {'text' => 'Type flag for blessed scalars. See C.','name' => 'SVt_PVMG'},'gv_fetchsv' => {'text' => '','name' => 'gv_fetchsv'},'PUSHp' => {'text' => 'Push a string onto the stack. The stack must have room for this element. |
673
|
|
|
|
|
|
|
The C indicates the length of the string. Handles \'set\' magic. Uses |
674
|
|
|
|
|
|
|
C, so C or C should be called to declare it. Do not |
675
|
|
|
|
|
|
|
call multiple C-oriented macros to return lists from XSUB\'s - see |
676
|
|
|
|
|
|
|
C instead. See also C and C. |
677
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
void PUSHp(char* str, STRLEN len)','name' => 'PUSHp'},'my_strftime' => {'text' => '','name' => 'my_strftime'},'mXPUSHi' => {'text' => 'Push an integer onto the stack, extending the stack if necessary. |
679
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
680
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
void mXPUSHi(IV iv)','name' => 'mXPUSHi'},'PL_sv_undef' => {'text' => 'This is the C SV. Always refer to this as C<&PL_sv_undef>. |
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
SV PL_sv_undef','name' => 'PL_sv_undef'},'hv_iterkeysv' => {'text' => 'Returns the key as an C from the current position of the hash |
684
|
|
|
|
|
|
|
iterator. The return value will always be a mortal copy of the key. Also |
685
|
|
|
|
|
|
|
see C. |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
SV* hv_iterkeysv(HE* entry)','name' => 'hv_iterkeysv'},'mPUSHp' => {'text' => 'Push a string onto the stack. The stack must have room for this element. |
688
|
|
|
|
|
|
|
The C indicates the length of the string. Does not use C. |
689
|
|
|
|
|
|
|
See also C, C and C. |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
void mPUSHp(char* str, STRLEN len)','name' => 'mPUSHp'},'av_delete' => {'text' => 'Deletes the element indexed by C from the array. Returns the |
692
|
|
|
|
|
|
|
deleted element. If C equals C, the element is freed |
693
|
|
|
|
|
|
|
and null is returned. |
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
SV* av_delete(AV *av, I32 key, I32 flags)','name' => 'av_delete'},'utf8_distance' => {'text' => 'Returns the number of UTF-8 characters between the UTF-8 pointers C |
696
|
|
|
|
|
|
|
and C. |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
WARNING: use only if you *know* that the pointers point inside the |
699
|
|
|
|
|
|
|
same UTF-8 buffer. |
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
IV utf8_distance(const U8 *a, const U8 *b)','name' => 'utf8_distance'},'SvPV_nomg' => {'text' => 'Like C but doesn\'t process magic. |
702
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
char* SvPV_nomg(SV* sv, STRLEN len)','name' => 'SvPV_nomg'},'parser_dup' => {'text' => '','name' => 'parser_dup'},'do_sprintf' => {'text' => '','name' => 'do_sprintf'},'SvUV_nomg' => {'text' => 'Like C but doesn\'t process magic. |
704
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
UV SvUV_nomg(SV* sv)','name' => 'SvUV_nomg'},'save_I32' => {'text' => '','name' => 'save_I32'},'gv_autoload4' => {'text' => '','name' => 'gv_autoload4'},'POPpx' => {'text' => 'Pops a string off the stack. |
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
char* POPpx','name' => 'POPpx'},'newCONDOP' => {'text' => '','name' => 'newCONDOP'},'PL_modglobal' => {'text' => 'C is a general purpose, interpreter global HV for use by |
708
|
|
|
|
|
|
|
extensions that need to keep information on a per-interpreter basis. |
709
|
|
|
|
|
|
|
In a pinch, it can also be used as a symbol table for extensions |
710
|
|
|
|
|
|
|
to share data among each other. It is a good idea to use keys |
711
|
|
|
|
|
|
|
prefixed by the package name of the extension that owns the data. |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
HV* PL_modglobal','name' => 'PL_modglobal'},'sv_setpvs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
714
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
void sv_setpvs(SV* sv, const char* s)','name' => 'sv_setpvs'},'is_uni_punct_lc' => {'text' => '','name' => 'is_uni_punct_lc'},'cxinc' => {'text' => '','name' => 'cxinc'},'SvUVx' => {'text' => 'Coerces the given SV to an unsigned integer and returns it. Guarantees to |
716
|
|
|
|
|
|
|
C only once. Only use this if C is an expression with side effects, |
717
|
|
|
|
|
|
|
otherwise use the more efficient C. |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
UV SvUVx(SV* sv)','name' => 'SvUVx'},'SvROK_on' => {'text' => 'Tells an SV that it is an RV. |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
void SvROK_on(SV* sv)','name' => 'SvROK_on'},'G_VOID' => {'text' => 'Used to indicate void context. See C and L.','name' => 'G_VOID'},'sv_clear' => {'text' => 'Clear an SV: call any destructors, free up any memory used by the body, |
722
|
|
|
|
|
|
|
and free the body itself. The SV\'s head is I freed, although |
723
|
|
|
|
|
|
|
its type is set to all 1\'s so that it won\'t inadvertently be assumed |
724
|
|
|
|
|
|
|
to be live during global destruction etc. |
725
|
|
|
|
|
|
|
This function should only be called when REFCNT is zero. Most of the time |
726
|
|
|
|
|
|
|
you\'ll want to call C (or its macro wrapper C) |
727
|
|
|
|
|
|
|
instead. |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
void sv_clear(SV *const sv)','name' => 'sv_clear'},'lex_read_space' => {'text' => 'Reads optional spaces, in Perl style, in the text currently being |
730
|
|
|
|
|
|
|
lexed. The spaces may include ordinary whitespace characters and |
731
|
|
|
|
|
|
|
Perl-style comments. C<#line> directives are processed if encountered. |
732
|
|
|
|
|
|
|
Lbufptr> is moved past the spaces, so that it points |
733
|
|
|
|
|
|
|
at a non-space character (or the end of the input text). |
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
If spaces extend into the next chunk of input text, the next chunk will |
736
|
|
|
|
|
|
|
be read in. Normally the current chunk will be discarded at the same |
737
|
|
|
|
|
|
|
time, but if I includes C then the current |
738
|
|
|
|
|
|
|
chunk will not be discarded. |
739
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
741
|
|
|
|
|
|
|
removed without notice. |
742
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
void lex_read_space(U32 flags)','name' => 'lex_read_space'},'XSRETURN_NV' => {'text' => 'Return a double from an XSUB immediately. Uses C. |
744
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
void XSRETURN_NV(NV nv)','name' => 'XSRETURN_NV'},'SvGAMAGIC' => {'text' => 'Returns true if the SV has get magic or overloading. If either is true then |
746
|
|
|
|
|
|
|
the scalar is active data, and has the potential to return a new value every |
747
|
|
|
|
|
|
|
time it is accessed. Hence you must be careful to only read it once per user |
748
|
|
|
|
|
|
|
logical operation and work with that returned value. If neither is true then |
749
|
|
|
|
|
|
|
the scalar\'s value cannot change unless written to. |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
U32 SvGAMAGIC(SV* sv)','name' => 'SvGAMAGIC'},'svtype' => {'text' => 'An enum of flags for Perl types. These are found in the file B |
752
|
|
|
|
|
|
|
in the C enum. Test these flags with the C macro.','name' => 'svtype'},'hv_placeholders_get' => {'text' => '','name' => 'hv_placeholders_get'},'load_module' => {'text' => 'Loads the module whose name is pointed to by the string part of name. |
753
|
|
|
|
|
|
|
Note that the actual module name, not its filename, should be given. |
754
|
|
|
|
|
|
|
Eg, "Foo::Bar" instead of "Foo/Bar.pm". flags can be any of |
755
|
|
|
|
|
|
|
PERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, or PERL_LOADMOD_IMPORT_OPS |
756
|
|
|
|
|
|
|
(or 0 for no flags). ver, if specified, provides version semantics |
757
|
|
|
|
|
|
|
similar to C |
758
|
|
|
|
|
|
|
arguments can be used to specify arguments to the module\'s import() |
759
|
|
|
|
|
|
|
method, similar to C |
760
|
|
|
|
|
|
|
terminated with a final NULL pointer. Note that this list can only |
761
|
|
|
|
|
|
|
be omitted when the PERL_LOADMOD_NOIMPORT flag has been used. |
762
|
|
|
|
|
|
|
Otherwise at least a single NULL pointer to designate the default |
763
|
|
|
|
|
|
|
import list is required. |
764
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
void load_module(U32 flags, SV* name, SV* ver, ...)','name' => 'load_module'},'dump_eval' => {'text' => '','name' => 'dump_eval'},'Poison' => {'text' => 'PoisonWith(0xEF) for catching access to freed memory. |
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
void Poison(void* dest, int nitems, type)','name' => 'Poison'},'is_uni_alpha_lc' => {'text' => '','name' => 'is_uni_alpha_lc'},'sv_catpvf_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
void sv_catpvf_mg(SV *const sv, const char *const pat, ...)','name' => 'sv_catpvf_mg'},'get_sv' => {'text' => 'Returns the SV of the specified Perl scalar. C are passed to |
770
|
|
|
|
|
|
|
C. If C is set and the |
771
|
|
|
|
|
|
|
Perl variable does not exist then it will be created. If C is zero |
772
|
|
|
|
|
|
|
and the variable does not exist then NULL is returned. |
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
SV* get_sv(const char *name, I32 flags)','name' => 'get_sv'},'GetVars' => {'text' => '','name' => 'GetVars'},'do_hv_dump' => {'text' => '','name' => 'do_hv_dump'},'sv_setpv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
void sv_setpv_mg(SV *const sv, const char *const ptr)','name' => 'sv_setpv_mg'},'whichsig' => {'text' => '','name' => 'whichsig'},'lex_next_chunk' => {'text' => 'Reads in the next chunk of text to be lexed, appending it to |
779
|
|
|
|
|
|
|
Llinestr>. This should be called when lexing code has |
780
|
|
|
|
|
|
|
looked to the end of the current chunk and wants to know more. It is |
781
|
|
|
|
|
|
|
usual, but not necessary, for lexing to have consumed the entirety of |
782
|
|
|
|
|
|
|
the current chunk at this time. |
783
|
|
|
|
|
|
|
|
784
|
|
|
|
|
|
|
If Lbufptr> is pointing to the very end of the current |
785
|
|
|
|
|
|
|
chunk (i.e., the current chunk has been entirely consumed), normally the |
786
|
|
|
|
|
|
|
current chunk will be discarded at the same time that the new chunk is |
787
|
|
|
|
|
|
|
read in. If I includes C, the current chunk |
788
|
|
|
|
|
|
|
will not be discarded. If the current chunk has not been entirely |
789
|
|
|
|
|
|
|
consumed, then it will not be discarded regardless of the flag. |
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
Returns true if some new text was added to the buffer, or false if the |
792
|
|
|
|
|
|
|
buffer has reached the end of the input text. |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
795
|
|
|
|
|
|
|
removed without notice. |
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
bool lex_next_chunk(U32 flags)','name' => 'lex_next_chunk'},'sv_2mortal' => {'text' => 'Marks an existing SV as mortal. The SV will be destroyed "soon", either |
798
|
|
|
|
|
|
|
by an explicit call to FREETMPS, or by an implicit call at places such as |
799
|
|
|
|
|
|
|
statement boundaries. SvTEMP() is turned on which means that the SV\'s |
800
|
|
|
|
|
|
|
string buffer can be "stolen" if this SV is copied. See also C |
801
|
|
|
|
|
|
|
and C. |
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
SV* sv_2mortal(SV *const sv)','name' => 'sv_2mortal'},'hv_store_flags' => {'text' => '','name' => 'hv_store_flags'},'is_uni_graph' => {'text' => '','name' => 'is_uni_graph'},'malloc' => {'text' => '','name' => 'malloc'},'av_undef' => {'text' => 'Undefines the array. Frees the memory used by the array itself. |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
void av_undef(AV *av)','name' => 'av_undef'},'pack_cat' => {'text' => 'The engine implementing pack() Perl function. Note: parameters next_in_list and |
806
|
|
|
|
|
|
|
flags are not used. This call should not be used; use packlist instead. |
807
|
|
|
|
|
|
|
|
808
|
|
|
|
|
|
|
void pack_cat(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)','name' => 'pack_cat'},'PerlIO_read' => {'text' => '','name' => 'PerlIO_read'},'sv_cmp' => {'text' => 'Compares the strings in two SVs. Returns -1, 0, or 1 indicating whether the |
809
|
|
|
|
|
|
|
string in C is less than, equal to, or greater than the string in |
810
|
|
|
|
|
|
|
C. Is UTF-8 and \'use bytes\' aware, handles get magic, and will |
811
|
|
|
|
|
|
|
coerce its args to strings if necessary. See also C. |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
I32 sv_cmp(SV *const sv1, SV *const sv2)','name' => 'sv_cmp'},'mg_free' => {'text' => 'Free any magic storage used by the SV. See C. |
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
int mg_free(SV* sv)','name' => 'mg_free'},'sv_force_normal_flags' => {'text' => 'Undo various types of fakery on an SV: if the PV is a shared string, make |
816
|
|
|
|
|
|
|
a private copy; if we\'re a ref, stop refing; if we\'re a glob, downgrade to |
817
|
|
|
|
|
|
|
an xpvmg; if we\'re a copy-on-write scalar, this is the on-write time when |
818
|
|
|
|
|
|
|
we do the copy, and is also used locally. If C is set |
819
|
|
|
|
|
|
|
then a copy-on-write scalar drops its PV buffer (if any) and becomes |
820
|
|
|
|
|
|
|
SvPOK_off rather than making a copy. (Used where this scalar is about to be |
821
|
|
|
|
|
|
|
set to some other value.) In addition, the C parameter gets passed to |
822
|
|
|
|
|
|
|
C when unrefing. C calls this function |
823
|
|
|
|
|
|
|
with flags set to 0. |
824
|
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
void sv_force_normal_flags(SV *const sv, const U32 flags)','name' => 'sv_force_normal_flags'},'tmps_grow' => {'text' => '','name' => 'tmps_grow'},'is_utf8_char' => {'text' => 'Tests if some arbitrary number of bytes begins in a valid UTF-8 |
826
|
|
|
|
|
|
|
character. Note that an INVARIANT (i.e. ASCII on non-EBCDIC machines) |
827
|
|
|
|
|
|
|
character is a valid UTF-8 character. The actual number of bytes in the UTF-8 |
828
|
|
|
|
|
|
|
character will be returned if it is valid, otherwise 0. |
829
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
STRLEN is_utf8_char(const U8 *s)','name' => 'is_utf8_char'},'get_vtbl' => {'text' => '','name' => 'get_vtbl'},'SvNOK_off' => {'text' => 'Unsets the NV status of an SV. |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
void SvNOK_off(SV* sv)','name' => 'SvNOK_off'},'sv_utf8_upgrade' => {'text' => 'Converts the PV of an SV to its UTF-8-encoded form. |
833
|
|
|
|
|
|
|
Forces the SV to string form if it is not already. |
834
|
|
|
|
|
|
|
Will C on C if appropriate. |
835
|
|
|
|
|
|
|
Always sets the SvUTF8 flag to avoid future validity checks even |
836
|
|
|
|
|
|
|
if the whole string is the same in UTF-8 as not. |
837
|
|
|
|
|
|
|
Returns the number of bytes in the converted string |
838
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
This is not as a general purpose byte encoding to Unicode interface: |
840
|
|
|
|
|
|
|
use the Encode extension for that. |
841
|
|
|
|
|
|
|
|
842
|
|
|
|
|
|
|
STRLEN sv_utf8_upgrade(SV *sv)','name' => 'sv_utf8_upgrade'},'dXSARGS' => {'text' => 'Sets up stack and mark pointers for an XSUB, calling dSP and dMARK. |
843
|
|
|
|
|
|
|
Sets up the C and C variables by calling C and C. |
844
|
|
|
|
|
|
|
This is usually handled automatically by C. |
845
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
dXSARGS;','name' => 'dXSARGS'},'savesharedpv' => {'text' => 'A version of C which allocates the duplicate string in memory |
847
|
|
|
|
|
|
|
which is shared between threads. |
848
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
char* savesharedpv(const char* pv)','name' => 'savesharedpv'},'isSPACE' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
850
|
|
|
|
|
|
|
whitespace. |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
bool isSPACE(char ch)','name' => 'isSPACE'},'Safefree' => {'text' => 'The XSUB-writer\'s interface to the C C function. |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
void Safefree(void* ptr)','name' => 'Safefree'},'custom_op_desc' => {'text' => '','name' => 'custom_op_desc'},'regdupe_internal' => {'text' => '','name' => 'regdupe_internal'},'gv_stashpvn' => {'text' => 'Returns a pointer to the stash for a specified package. The C |
855
|
|
|
|
|
|
|
parameter indicates the length of the C, in bytes. C is passed |
856
|
|
|
|
|
|
|
to C, so if set to C then the package will be |
857
|
|
|
|
|
|
|
created if it does not already exist. If the package does not exist and |
858
|
|
|
|
|
|
|
C is 0 (or any other setting that does not create packages) then NULL |
859
|
|
|
|
|
|
|
is returned. |
860
|
|
|
|
|
|
|
|
861
|
|
|
|
|
|
|
|
862
|
|
|
|
|
|
|
HV* gv_stashpvn(const char* name, U32 namelen, I32 flags)','name' => 'gv_stashpvn'},'vmess' => {'text' => '','name' => 'vmess'},'to_uni_fold' => {'text' => '','name' => 'to_uni_fold'},'new_collate' => {'text' => '','name' => 'new_collate'},'my_stat' => {'text' => '','name' => 'my_stat'},'my_setenv' => {'text' => '','name' => 'my_setenv'},'newSV_type' => {'text' => 'Creates a new SV, of the type specified. The reference count for the new SV |
863
|
|
|
|
|
|
|
is set to 1. |
864
|
|
|
|
|
|
|
|
865
|
|
|
|
|
|
|
SV* newSV_type(const svtype type)','name' => 'newSV_type'},'SvREFCNT_inc_void_NN' => {'text' => 'Same as SvREFCNT_inc, but can only be used if you don\'t need the return |
866
|
|
|
|
|
|
|
value, and you know that I is not NULL. The macro doesn\'t need |
867
|
|
|
|
|
|
|
to return a meaningful value, or check for NULLness, so it\'s smaller |
868
|
|
|
|
|
|
|
and faster. |
869
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
void SvREFCNT_inc_void_NN(SV* sv)','name' => 'SvREFCNT_inc_void_NN'},'Perl_signbit' => {'text' => 'Return a non-zero integer if the sign bit on an NV is set, and 0 if |
871
|
|
|
|
|
|
|
it is not. |
872
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
If Configure detects this system has a signbit() that will work with |
874
|
|
|
|
|
|
|
our NVs, then we just use it via the #define in perl.h. Otherwise, |
875
|
|
|
|
|
|
|
fall back on this implementation. As a first pass, this gets everything |
876
|
|
|
|
|
|
|
right except -0.0. Alas, catching -0.0 is the main use for this function, |
877
|
|
|
|
|
|
|
so this is not too helpful yet. Still, at least we have the scaffolding |
878
|
|
|
|
|
|
|
in place to support other systems, should that prove useful. |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
Configure notes: This function is called \'Perl_signbit\' instead of a |
882
|
|
|
|
|
|
|
plain \'signbit\' because it is easy to imagine a system having a signbit() |
883
|
|
|
|
|
|
|
function or macro that doesn\'t happen to work with our particular choice |
884
|
|
|
|
|
|
|
of NVs. We shouldn\'t just re-#define signbit as Perl_signbit and expect |
885
|
|
|
|
|
|
|
the standard system headers to be happy. Also, this is a no-context |
886
|
|
|
|
|
|
|
function (no pTHX_) because Perl_signbit() is usually re-#defined in |
887
|
|
|
|
|
|
|
perl.h as a simple macro call to the system\'s signbit(). |
888
|
|
|
|
|
|
|
Users should just always call Perl_signbit(). |
889
|
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
891
|
|
|
|
|
|
|
removed without notice. |
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
int Perl_signbit(NV f)','name' => 'Perl_signbit'},'PUSH_MULTICALL' => {'text' => 'Opening bracket for a lightweight callback. |
894
|
|
|
|
|
|
|
See L. |
895
|
|
|
|
|
|
|
|
896
|
|
|
|
|
|
|
PUSH_MULTICALL;','name' => 'PUSH_MULTICALL'},'new_ctype' => {'text' => '','name' => 'new_ctype'},'save_svref' => {'text' => '','name' => 'save_svref'},'to_uni_upper' => {'text' => '','name' => 'to_uni_upper'},'newNULLLIST' => {'text' => '','name' => 'newNULLLIST'},'is_uni_cntrl_lc' => {'text' => '','name' => 'is_uni_cntrl_lc'},'is_utf8_lower' => {'text' => '','name' => 'is_utf8_lower'},'sv_pos_u2b_flags' => {'text' => 'Converts the value pointed to by offsetp from a count of UTF-8 chars from |
897
|
|
|
|
|
|
|
the start of the string, to a count of the equivalent number of bytes; if |
898
|
|
|
|
|
|
|
lenp is non-zero, it does the same to lenp, but this time starting from |
899
|
|
|
|
|
|
|
the offset, rather than from the start of the string. Handles type coercion. |
900
|
|
|
|
|
|
|
I is passed to C, and usually should be |
901
|
|
|
|
|
|
|
C to handle magic. |
902
|
|
|
|
|
|
|
|
903
|
|
|
|
|
|
|
STRLEN sv_pos_u2b_flags(SV *const sv, STRLEN uoffset, STRLEN *const lenp, U32 flags)','name' => 'sv_pos_u2b_flags'},'init_tm' => {'text' => '','name' => 'init_tm'},'newWHILEOP' => {'text' => '','name' => 'newWHILEOP'},'Gv_AMupdate' => {'text' => '','name' => 'Gv_AMupdate'},'filter_del' => {'text' => '','name' => 'filter_del'},'POPp' => {'text' => 'Pops a string off the stack. Deprecated. New code should use POPpx. |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
char* POPp','name' => 'POPp'},'SvIV_nomg' => {'text' => 'Like C but doesn\'t process magic. |
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
IV SvIV_nomg(SV* sv)','name' => 'SvIV_nomg'},'RETVAL' => {'text' => 'Variable which is setup by C to hold the return value for an |
908
|
|
|
|
|
|
|
XSUB. This is always the proper type for the XSUB. See |
909
|
|
|
|
|
|
|
L. |
910
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
(whatever) RETVAL','name' => 'RETVAL'},'HeSVKEY' => {'text' => 'Returns the key as an C, or C if the hash entry does not |
912
|
|
|
|
|
|
|
contain an C key. |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
SV* HeSVKEY(HE* he)','name' => 'HeSVKEY'},'newANONLIST' => {'text' => '','name' => 'newANONLIST'},'my_memset' => {'text' => '','name' => 'my_memset'},'my_atof2' => {'text' => '','name' => 'my_atof2'},'PerlIO_get_ptr' => {'text' => '','name' => 'PerlIO_get_ptr'},'save_destructor' => {'text' => '','name' => 'save_destructor'},'hv_iternextsv' => {'text' => 'Performs an C, C, and C in one |
915
|
|
|
|
|
|
|
operation. |
916
|
|
|
|
|
|
|
|
917
|
|
|
|
|
|
|
SV* hv_iternextsv(HV *hv, char **key, I32 *retlen)','name' => 'hv_iternextsv'},'lex_read_to' => {'text' => 'Consume text in the lexer buffer, from Lbufptr> up |
918
|
|
|
|
|
|
|
to I. This advances Lbufptr> to match I, |
919
|
|
|
|
|
|
|
performing the correct bookkeeping whenever a newline character is passed. |
920
|
|
|
|
|
|
|
This is the normal way to consume lexed text. |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
Interpretation of the buffer\'s octets can be abstracted out by |
923
|
|
|
|
|
|
|
using the slightly higher-level functions L and |
924
|
|
|
|
|
|
|
L. |
925
|
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
927
|
|
|
|
|
|
|
removed without notice. |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
void lex_read_to(char *ptr)','name' => 'lex_read_to'},'sv_pvbyten_force' => {'text' => 'The backend for the C macro. Always use the macro instead. |
930
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
char* sv_pvbyten_force(SV *const sv, STRLEN *const lp)','name' => 'sv_pvbyten_force'},'reg_named_buff_fetch' => {'text' => '','name' => 'reg_named_buff_fetch'},'ibcmp_locale' => {'text' => '','name' => 'ibcmp_locale'},'XST_mIV' => {'text' => 'Place an integer into the specified position C on the stack. The |
932
|
|
|
|
|
|
|
value is stored in a new mortal SV. |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
void XST_mIV(int pos, IV iv)','name' => 'XST_mIV'},'save_pptr' => {'text' => '','name' => 'save_pptr'},'PerlIO_set_ptrcnt' => {'text' => '','name' => 'PerlIO_set_ptrcnt'},'mPUSHs' => {'text' => 'Push an SV onto the stack and mortalizes the SV. The stack must have room |
935
|
|
|
|
|
|
|
for this element. Does not use C. See also C and C. |
936
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
void mPUSHs(SV* sv)','name' => 'mPUSHs'},'dump_packsubs' => {'text' => '','name' => 'dump_packsubs'},'is_utf8_digit' => {'text' => '','name' => 'is_utf8_digit'},'GvSV' => {'text' => 'Return the SV from the GV. |
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
SV* GvSV(GV* gv)','name' => 'GvSV'},'init_i18nl10n' => {'text' => '','name' => 'init_i18nl10n'},'vform' => {'text' => '','name' => 'vform'},'get_op_descs' => {'text' => '','name' => 'get_op_descs'},'safesyscalloc' => {'text' => '','name' => 'safesyscalloc'},'POPi' => {'text' => 'Pops an integer off the stack. |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
IV POPi','name' => 'POPi'},'sv_2pvutf8_nolen' => {'text' => 'Return a pointer to the UTF-8-encoded representation of the SV. |
942
|
|
|
|
|
|
|
May cause the SV to be upgraded to UTF-8 as a side-effect. |
943
|
|
|
|
|
|
|
|
944
|
|
|
|
|
|
|
Usually accessed via the C macro. |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
char* sv_2pvutf8_nolen(SV* sv)','name' => 'sv_2pvutf8_nolen'},'gv_HVadd' => {'text' => '','name' => 'gv_HVadd'},'mro_get_linear_isa' => {'text' => 'Returns either C or |
947
|
|
|
|
|
|
|
C for the given stash, |
948
|
|
|
|
|
|
|
dependant upon which MRO is in effect |
949
|
|
|
|
|
|
|
for that stash. The return value is a |
950
|
|
|
|
|
|
|
read-only AV*. |
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
You are responsible for C on the |
953
|
|
|
|
|
|
|
return value if you plan to store it anywhere |
954
|
|
|
|
|
|
|
semi-permanently (otherwise it might be deleted |
955
|
|
|
|
|
|
|
out from under you the next time the cache is |
956
|
|
|
|
|
|
|
invalidated). |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
AV* mro_get_linear_isa(HV* stash)','name' => 'mro_get_linear_isa'},'av_store' => {'text' => 'Stores an SV in an array. The array index is specified as C. The |
959
|
|
|
|
|
|
|
return value will be NULL if the operation failed or if the value did not |
960
|
|
|
|
|
|
|
need to be actually stored within the array (as in the case of tied |
961
|
|
|
|
|
|
|
arrays). Otherwise it can be dereferenced to get the original C. Note |
962
|
|
|
|
|
|
|
that the caller is responsible for suitably incrementing the reference |
963
|
|
|
|
|
|
|
count of C before the call, and decrementing it if the function |
964
|
|
|
|
|
|
|
returned NULL. |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
See L for |
967
|
|
|
|
|
|
|
more information on how to use this function on tied arrays. |
968
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
SV** av_store(AV *av, I32 key, SV *val)','name' => 'av_store'},'SvPVbytex' => {'text' => 'Like C, but converts sv to byte representation first if necessary. |
970
|
|
|
|
|
|
|
Guarantees to evaluate sv only once; use the more efficient C |
971
|
|
|
|
|
|
|
otherwise. |
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
char* SvPVbytex(SV* sv, STRLEN len)','name' => 'SvPVbytex'},'reg_named_buff_scalar' => {'text' => '','name' => 'reg_named_buff_scalar'},'unlnk' => {'text' => '','name' => 'unlnk'},'av_fetch' => {'text' => 'Returns the SV at the specified index in the array. The C is the |
974
|
|
|
|
|
|
|
index. If C is set then the fetch will be part of a store. Check |
975
|
|
|
|
|
|
|
that the return value is non-null before dereferencing it to a C. |
976
|
|
|
|
|
|
|
|
977
|
|
|
|
|
|
|
See L for |
978
|
|
|
|
|
|
|
more information on how to use this function on tied arrays. |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
SV** av_fetch(AV *av, I32 key, I32 lval)','name' => 'av_fetch'},'SvNOK_only' => {'text' => 'Tells an SV that it is a double and disables all other OK bits. |
981
|
|
|
|
|
|
|
|
982
|
|
|
|
|
|
|
void SvNOK_only(SV* sv)','name' => 'SvNOK_only'},'hv_iterval' => {'text' => 'Returns the value from the current position of the hash iterator. See |
983
|
|
|
|
|
|
|
C. |
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
SV* hv_iterval(HV *hv, HE *entry)','name' => 'hv_iterval'},'is_uni_xdigit_lc' => {'text' => '','name' => 'is_uni_xdigit_lc'},'sv_reftype' => {'text' => 'Returns a string describing what the SV is a reference to. |
986
|
|
|
|
|
|
|
|
987
|
|
|
|
|
|
|
const char* sv_reftype(const SV *const sv, const int ob)','name' => 'sv_reftype'},'SvREFCNT_inc_simple_void_NN' => {'text' => 'Same as SvREFCNT_inc, but can only be used if you don\'t need the return |
988
|
|
|
|
|
|
|
value, and you know that I is not NULL. The macro doesn\'t need |
989
|
|
|
|
|
|
|
to return a meaningful value, or check for NULLness, so it\'s smaller |
990
|
|
|
|
|
|
|
and faster. |
991
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
void SvREFCNT_inc_simple_void_NN(SV* sv)','name' => 'SvREFCNT_inc_simple_void_NN'},'rsignal_state' => {'text' => '','name' => 'rsignal_state'},'av_len' => {'text' => 'Returns the highest index in the array. The number of elements in the |
993
|
|
|
|
|
|
|
array is C. Returns -1 if the array is empty. |
994
|
|
|
|
|
|
|
|
995
|
|
|
|
|
|
|
I32 av_len(AV *av)','name' => 'av_len'},'sv_unmagic' => {'text' => 'Removes all magic of type C from an SV. |
996
|
|
|
|
|
|
|
|
997
|
|
|
|
|
|
|
int sv_unmagic(SV *const sv, const int type)','name' => 'sv_unmagic'},'SvTAINT' => {'text' => 'Taints an SV if tainting is enabled. |
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
void SvTAINT(SV* sv)','name' => 'SvTAINT'},'mg_clear' => {'text' => 'Clear something magical that the SV represents. See C. |
1000
|
|
|
|
|
|
|
|
1001
|
|
|
|
|
|
|
int mg_clear(SV* sv)','name' => 'mg_clear'},'my_sprintf' => {'text' => 'The C library C, wrapped if necessary, to ensure that it will return |
1002
|
|
|
|
|
|
|
the length of the string written to the buffer. Only rare pre-ANSI systems |
1003
|
|
|
|
|
|
|
need the wrapper function - usually this is a direct call to C. |
1004
|
|
|
|
|
|
|
|
1005
|
|
|
|
|
|
|
int my_sprintf(char *buffer, const char *pat, ...)','name' => 'my_sprintf'},'to_utf8_fold' => {'text' => 'Convert the UTF-8 encoded character at p to its foldcase version and |
1006
|
|
|
|
|
|
|
store that in UTF-8 in ustrp and its length in bytes in lenp. Note |
1007
|
|
|
|
|
|
|
that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the |
1008
|
|
|
|
|
|
|
foldcase version may be longer than the original character (up to |
1009
|
|
|
|
|
|
|
three characters). |
1010
|
|
|
|
|
|
|
|
1011
|
|
|
|
|
|
|
The first character of the foldcased version is returned |
1012
|
|
|
|
|
|
|
(but note, as explained above, that there may be more.) |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
UV to_utf8_fold(const U8 *p, U8* ustrp, STRLEN *lenp)','name' => 'to_utf8_fold'},'regfree_internal' => {'text' => '','name' => 'regfree_internal'},'gv_stashpv' => {'text' => 'Returns a pointer to the stash for a specified package. Uses C to |
1015
|
|
|
|
|
|
|
determine the length of C, then calls C. |
1016
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
HV* gv_stashpv(const char* name, I32 flags)','name' => 'gv_stashpv'},'sv_vcatpvf_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
1018
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
Usually used via its frontend C. |
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
void sv_vcatpvf_mg(SV *const sv, const char *const pat, va_list *const args)','name' => 'sv_vcatpvf_mg'},'mXPUSHu' => {'text' => 'Push an unsigned integer onto the stack, extending the stack if necessary. |
1022
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
1023
|
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
void mXPUSHu(UV uv)','name' => 'mXPUSHu'},'hv_exists_ent' => {'text' => 'Returns a boolean indicating whether the specified hash key exists. C |
1025
|
|
|
|
|
|
|
can be a valid precomputed hash value, or 0 to ask for it to be |
1026
|
|
|
|
|
|
|
computed. |
1027
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
bool hv_exists_ent(HV *hv, SV *keysv, U32 hash)','name' => 'hv_exists_ent'},'atfork_unlock' => {'text' => '','name' => 'atfork_unlock'},'SvNIOK' => {'text' => 'Returns a U32 value indicating whether the SV contains a number, integer or |
1029
|
|
|
|
|
|
|
double. |
1030
|
|
|
|
|
|
|
|
1031
|
|
|
|
|
|
|
U32 SvNIOK(SV* sv)','name' => 'SvNIOK'},'save_long' => {'text' => '','name' => 'save_long'},'mro_method_changed_in' => {'text' => 'Invalidates method caching on any child classes |
1032
|
|
|
|
|
|
|
of the given stash, so that they might notice |
1033
|
|
|
|
|
|
|
the changes in this one. |
1034
|
|
|
|
|
|
|
|
1035
|
|
|
|
|
|
|
Ideally, all instances of C in |
1036
|
|
|
|
|
|
|
perl source outside of C should be |
1037
|
|
|
|
|
|
|
replaced by calls to this. |
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
Perl automatically handles most of the common |
1040
|
|
|
|
|
|
|
ways a method might be redefined. However, there |
1041
|
|
|
|
|
|
|
are a few ways you could change a method in a stash |
1042
|
|
|
|
|
|
|
without the cache code noticing, in which case you |
1043
|
|
|
|
|
|
|
need to call this method afterwards: |
1044
|
|
|
|
|
|
|
|
1045
|
|
|
|
|
|
|
1) Directly manipulating the stash HV entries from |
1046
|
|
|
|
|
|
|
XS code. |
1047
|
|
|
|
|
|
|
|
1048
|
|
|
|
|
|
|
2) Assigning a reference to a readonly scalar |
1049
|
|
|
|
|
|
|
constant into a stash entry in order to create |
1050
|
|
|
|
|
|
|
a constant subroutine (like constant.pm |
1051
|
|
|
|
|
|
|
does). |
1052
|
|
|
|
|
|
|
|
1053
|
|
|
|
|
|
|
This same method is available from pure perl |
1054
|
|
|
|
|
|
|
via, C. |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
void mro_method_changed_in(HV* stash)','name' => 'mro_method_changed_in'},'unpack_str' => {'text' => 'The engine implementing unpack() Perl function. Note: parameters strbeg, new_s |
1057
|
|
|
|
|
|
|
and ocnt are not used. This call should not be used, use unpackstring instead. |
1058
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
I32 unpack_str(const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags)','name' => 'unpack_str'},'my_fflush_all' => {'text' => '','name' => 'my_fflush_all'},'is_uni_print' => {'text' => '','name' => 'is_uni_print'},'sv_newref' => {'text' => 'Increment an SV\'s reference count. Use the C wrapper |
1060
|
|
|
|
|
|
|
instead. |
1061
|
|
|
|
|
|
|
|
1062
|
|
|
|
|
|
|
SV* sv_newref(SV *const sv)','name' => 'sv_newref'},'XSRETURN_IV' => {'text' => 'Return an integer from an XSUB immediately. Uses C. |
1063
|
|
|
|
|
|
|
|
1064
|
|
|
|
|
|
|
void XSRETURN_IV(IV iv)','name' => 'XSRETURN_IV'},'sv_uni_display' => {'text' => 'Build to the scalar dsv a displayable version of the scalar sv, |
1065
|
|
|
|
|
|
|
the displayable version being at most pvlim bytes long |
1066
|
|
|
|
|
|
|
(if longer, the rest is truncated and "..." will be appended). |
1067
|
|
|
|
|
|
|
|
1068
|
|
|
|
|
|
|
The flags argument is as in pv_uni_display(). |
1069
|
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
The pointer to the PV of the dsv is returned. |
1071
|
|
|
|
|
|
|
|
1072
|
|
|
|
|
|
|
char* sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim, UV flags)','name' => 'sv_uni_display'},'newSVpvs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
SV* newSVpvs(const char* s)','name' => 'newSVpvs'},'SvREFCNT_dec' => {'text' => 'Decrements the reference count of the given SV. |
1075
|
|
|
|
|
|
|
|
1076
|
|
|
|
|
|
|
void SvREFCNT_dec(SV* sv)','name' => 'SvREFCNT_dec'},'realloc' => {'text' => '','name' => 'realloc'},'POPs' => {'text' => 'Pops an SV off the stack. |
1077
|
|
|
|
|
|
|
|
1078
|
|
|
|
|
|
|
SV* POPs','name' => 'POPs'},'packlist' => {'text' => 'The engine implementing pack() Perl function. |
1079
|
|
|
|
|
|
|
|
1080
|
|
|
|
|
|
|
void packlist(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist)','name' => 'packlist'},'SvNV' => {'text' => 'Coerce the given SV to a double and return it. See C for a version |
1081
|
|
|
|
|
|
|
which guarantees to evaluate sv only once. |
1082
|
|
|
|
|
|
|
|
1083
|
|
|
|
|
|
|
NV SvNV(SV* sv)','name' => 'SvNV'},'gv_fetchmethod_autoload' => {'text' => 'Returns the glob which contains the subroutine to call to invoke the method |
1084
|
|
|
|
|
|
|
on the C. In fact in the presence of autoloading this may be the |
1085
|
|
|
|
|
|
|
glob for "AUTOLOAD". In this case the corresponding variable $AUTOLOAD is |
1086
|
|
|
|
|
|
|
already setup. |
1087
|
|
|
|
|
|
|
|
1088
|
|
|
|
|
|
|
The third parameter of C determines whether |
1089
|
|
|
|
|
|
|
AUTOLOAD lookup is performed if the given method is not present: non-zero |
1090
|
|
|
|
|
|
|
means yes, look for AUTOLOAD; zero means no, don\'t look for AUTOLOAD. |
1091
|
|
|
|
|
|
|
Calling C is equivalent to calling C |
1092
|
|
|
|
|
|
|
with a non-zero C parameter. |
1093
|
|
|
|
|
|
|
|
1094
|
|
|
|
|
|
|
These functions grant C<"SUPER"> token as a prefix of the method name. Note |
1095
|
|
|
|
|
|
|
that if you want to keep the returned glob for a long time, you need to |
1096
|
|
|
|
|
|
|
check for it being "AUTOLOAD", since at the later time the call may load a |
1097
|
|
|
|
|
|
|
different subroutine due to $AUTOLOAD changing its value. Use the glob |
1098
|
|
|
|
|
|
|
created via a side effect to do this. |
1099
|
|
|
|
|
|
|
|
1100
|
|
|
|
|
|
|
These functions have the same side-effects and as C with |
1101
|
|
|
|
|
|
|
C. C should be writable if contains C<\':\'> or C<\' |
1102
|
|
|
|
|
|
|
\'\'>. The warning against passing the GV returned by C to |
1103
|
|
|
|
|
|
|
C apply equally to these functions. |
1104
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
GV* gv_fetchmethod_autoload(HV* stash, const char* name, I32 autoload)','name' => 'gv_fetchmethod_autoload'},'SvUTF8' => {'text' => 'Returns a U32 value indicating whether the SV contains UTF-8 encoded data. |
1106
|
|
|
|
|
|
|
Call this after SvPV() in case any call to string overloading updates the |
1107
|
|
|
|
|
|
|
internal flag. |
1108
|
|
|
|
|
|
|
|
1109
|
|
|
|
|
|
|
U32 SvUTF8(SV* sv)','name' => 'SvUTF8'},'op_dump' => {'text' => '','name' => 'op_dump'},'get_mstats' => {'text' => '','name' => 'get_mstats'},'savestack_grow' => {'text' => '','name' => 'savestack_grow'},'debstackptrs' => {'text' => '','name' => 'debstackptrs'},'SvTAINTED' => {'text' => 'Checks to see if an SV is tainted. Returns TRUE if it is, FALSE if |
1110
|
|
|
|
|
|
|
not. |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
bool SvTAINTED(SV* sv)','name' => 'SvTAINTED'},'sv_eq' => {'text' => 'Returns a boolean indicating whether the strings in the two SVs are |
1113
|
|
|
|
|
|
|
identical. Is UTF-8 and \'use bytes\' aware, handles get magic, and will |
1114
|
|
|
|
|
|
|
coerce its args to strings if necessary. |
1115
|
|
|
|
|
|
|
|
1116
|
|
|
|
|
|
|
I32 sv_eq(SV* sv1, SV* sv2)','name' => 'sv_eq'},'ptr_table_store' => {'text' => '','name' => 'ptr_table_store'},'cv_undef' => {'text' => 'Clear out all the active components of a CV. This can happen either |
1117
|
|
|
|
|
|
|
by an explicit C, or by the reference count going to zero. |
1118
|
|
|
|
|
|
|
In the former case, we keep the CvOUTSIDE pointer, so that any anonymous |
1119
|
|
|
|
|
|
|
children can still follow the full lexical scope chain. |
1120
|
|
|
|
|
|
|
|
1121
|
|
|
|
|
|
|
void cv_undef(CV* cv)','name' => 'cv_undef'},'StructCopy' => {'text' => 'This is an architecture-independent macro to copy one structure to another. |
1122
|
|
|
|
|
|
|
|
1123
|
|
|
|
|
|
|
void StructCopy(type src, type dest, type)','name' => 'StructCopy'},'sv_catpvf_nocontext' => {'text' => '','name' => 'sv_catpvf_nocontext'},'save_padsv_and_mortalize' => {'text' => '','name' => 'save_padsv_and_mortalize'},'get_cvn_flags' => {'text' => 'Returns the CV of the specified Perl subroutine. C are passed to |
1124
|
|
|
|
|
|
|
C. If C is set and the Perl subroutine does not |
1125
|
|
|
|
|
|
|
exist then it will be declared (which has the same effect as saying |
1126
|
|
|
|
|
|
|
C). If C is not set and the subroutine does not exist |
1127
|
|
|
|
|
|
|
then NULL is returned. |
1128
|
|
|
|
|
|
|
|
1129
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1130
|
|
|
|
|
|
|
|
1131
|
|
|
|
|
|
|
CV* get_cvn_flags(const char* name, STRLEN len, I32 flags)','name' => 'get_cvn_flags'},'reentrant_free' => {'text' => '','name' => 'reentrant_free'},'items' => {'text' => 'Variable which is setup by C to indicate the number of |
1132
|
|
|
|
|
|
|
items on the stack. See L. |
1133
|
|
|
|
|
|
|
|
1134
|
|
|
|
|
|
|
I32 items','name' => 'items'},'XST_mPV' => {'text' => 'Place a copy of a string into the specified position C on the stack. |
1135
|
|
|
|
|
|
|
The value is stored in a new mortal SV. |
1136
|
|
|
|
|
|
|
|
1137
|
|
|
|
|
|
|
void XST_mPV(int pos, char* str)','name' => 'XST_mPV'},'dump_vindent' => {'text' => '','name' => 'dump_vindent'},'SvPVx' => {'text' => 'A version of C which guarantees to evaluate C only once. |
1138
|
|
|
|
|
|
|
Only use this if C is an expression with side effects, otherwise use the |
1139
|
|
|
|
|
|
|
more efficient C. |
1140
|
|
|
|
|
|
|
|
1141
|
|
|
|
|
|
|
char* SvPVx(SV* sv, STRLEN len)','name' => 'SvPVx'},'dump_form' => {'text' => '','name' => 'dump_form'},'sv_grow' => {'text' => 'Expands the character buffer in the SV. If necessary, uses C and |
1142
|
|
|
|
|
|
|
upgrades the SV to C. Returns a pointer to the character buffer. |
1143
|
|
|
|
|
|
|
Use the C wrapper instead. |
1144
|
|
|
|
|
|
|
|
1145
|
|
|
|
|
|
|
char* sv_grow(SV *const sv, STRLEN newlen)','name' => 'sv_grow'},'vnormal' => {'text' => 'Accepts a version object and returns the normalized string |
1146
|
|
|
|
|
|
|
representation. Call like: |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
sv = vnormal(rv); |
1149
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
NOTE: you can pass either the object directly or the SV |
1151
|
|
|
|
|
|
|
contained within the RV. |
1152
|
|
|
|
|
|
|
|
1153
|
|
|
|
|
|
|
SV* vnormal(SV *vs)','name' => 'vnormal'},'newPVOP' => {'text' => '','name' => 'newPVOP'},'filter_add' => {'text' => '','name' => 'filter_add'},'XPUSHs' => {'text' => 'Push an SV onto the stack, extending the stack if necessary. Does not |
1154
|
|
|
|
|
|
|
handle \'set\' magic. Does not use C. See also C, |
1155
|
|
|
|
|
|
|
C and C. |
1156
|
|
|
|
|
|
|
|
1157
|
|
|
|
|
|
|
void XPUSHs(SV* sv)','name' => 'XPUSHs'},'is_uni_graph_lc' => {'text' => '','name' => 'is_uni_graph_lc'},'is_utf8_alnum' => {'text' => '','name' => 'is_utf8_alnum'},'set_numeric_radix' => {'text' => '','name' => 'set_numeric_radix'},'is_utf8_upper' => {'text' => '','name' => 'is_utf8_upper'},'newIO' => {'text' => '','name' => 'newIO'},'do_join' => {'text' => '','name' => 'do_join'},'save_helem' => {'text' => '','name' => 'save_helem'},'die' => {'text' => '','name' => 'die'},'sv_usepvn' => {'text' => 'Tells an SV to use C to find its string value. Implemented by |
1158
|
|
|
|
|
|
|
calling C with C of 0, hence does not handle \'set\' |
1159
|
|
|
|
|
|
|
magic. See C. |
1160
|
|
|
|
|
|
|
|
1161
|
|
|
|
|
|
|
void sv_usepvn(SV* sv, char* ptr, STRLEN len)','name' => 'sv_usepvn'},'SvREFCNT' => {'text' => 'Returns the value of the object\'s reference count. |
1162
|
|
|
|
|
|
|
|
1163
|
|
|
|
|
|
|
U32 SvREFCNT(SV* sv)','name' => 'SvREFCNT'},'swash_init' => {'text' => '','name' => 'swash_init'},'newANONSUB' => {'text' => '','name' => 'newANONSUB'},'warn' => {'text' => 'This is the XSUB-writer\'s interface to Perl\'s C function. Call this |
1164
|
|
|
|
|
|
|
function the same way you call the C C function. See C. |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
void warn(const char* pat, ...)','name' => 'warn'},'PerlIO_get_bufsiz' => {'text' => '','name' => 'PerlIO_get_bufsiz'},'to_uni_title_lc' => {'text' => '','name' => 'to_uni_title_lc'},'fp_dup' => {'text' => '','name' => 'fp_dup'},'hek_dup' => {'text' => '','name' => 'hek_dup'},'pmop_dump' => {'text' => '','name' => 'pmop_dump'},'newANONATTRSUB' => {'text' => '','name' => 'newANONATTRSUB'},'sv_catpvf_mg_nocontext' => {'text' => '','name' => 'sv_catpvf_mg_nocontext'},'reg_named_buff_all' => {'text' => '','name' => 'reg_named_buff_all'},'PerlIO_close' => {'text' => '','name' => 'PerlIO_close'},'EXTEND' => {'text' => 'Used to extend the argument stack for an XSUB\'s return values. Once |
1167
|
|
|
|
|
|
|
used, guarantees that there is room for at least C to be pushed |
1168
|
|
|
|
|
|
|
onto the stack. |
1169
|
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
void EXTEND(SP, int nitems)','name' => 'EXTEND'},'newOP' => {'text' => '','name' => 'newOP'},'newSVuv' => {'text' => 'Creates a new SV and copies an unsigned integer into it. |
1171
|
|
|
|
|
|
|
The reference count for the SV is set to 1. |
1172
|
|
|
|
|
|
|
|
1173
|
|
|
|
|
|
|
SV* newSVuv(const UV u)','name' => 'newSVuv'},'gv_fetchmeth' => {'text' => 'Returns the glob with the given C and a defined subroutine or |
1174
|
|
|
|
|
|
|
C. The glob lives in the given C, or in the stashes |
1175
|
|
|
|
|
|
|
accessible via @ISA and UNIVERSAL::. |
1176
|
|
|
|
|
|
|
|
1177
|
|
|
|
|
|
|
The argument C should be either 0 or -1. If C, as a |
1178
|
|
|
|
|
|
|
side-effect creates a glob with the given C in the given C |
1179
|
|
|
|
|
|
|
which in the case of success contains an alias for the subroutine, and sets |
1180
|
|
|
|
|
|
|
up caching info for this glob. |
1181
|
|
|
|
|
|
|
|
1182
|
|
|
|
|
|
|
This function grants C<"SUPER"> token as a postfix of the stash name. The |
1183
|
|
|
|
|
|
|
GV returned from C may be a method cache entry, which is not |
1184
|
|
|
|
|
|
|
visible to Perl code. So when calling C, you should not use |
1185
|
|
|
|
|
|
|
the GV directly; instead, you should use the method\'s CV, which can be |
1186
|
|
|
|
|
|
|
obtained from the GV with the C macro. |
1187
|
|
|
|
|
|
|
|
1188
|
|
|
|
|
|
|
GV* gv_fetchmeth(HV* stash, const char* name, STRLEN len, I32 level)','name' => 'gv_fetchmeth'},'op_refcnt_lock' => {'text' => '','name' => 'op_refcnt_lock'},'newGVgen' => {'text' => '','name' => 'newGVgen'},'sv_does' => {'text' => 'Returns a boolean indicating whether the SV performs a specific, named role. |
1189
|
|
|
|
|
|
|
The SV can be a Perl object or the name of a Perl class. |
1190
|
|
|
|
|
|
|
|
1191
|
|
|
|
|
|
|
bool sv_does(SV* sv, const char *const name)','name' => 'sv_does'},'delimcpy' => {'text' => '','name' => 'delimcpy'},'newLOOPOP' => {'text' => '','name' => 'newLOOPOP'},'reg_named_buff_firstkey' => {'text' => '','name' => 'reg_named_buff_firstkey'},'free_global_struct' => {'text' => '','name' => 'free_global_struct'},'uvuni_to_utf8' => {'text' => '','name' => 'uvuni_to_utf8'},'SvLEN' => {'text' => 'Returns the size of the string buffer in the SV, not including any part |
1192
|
|
|
|
|
|
|
attributable to C. See C. |
1193
|
|
|
|
|
|
|
|
1194
|
|
|
|
|
|
|
STRLEN SvLEN(SV* sv)','name' => 'SvLEN'},'PerlIO_tell' => {'text' => '','name' => 'PerlIO_tell'},'SvPOK_only_UTF8' => {'text' => 'Tells an SV that it is a string and disables all other OK bits, |
1195
|
|
|
|
|
|
|
and leaves the UTF-8 status as it was. |
1196
|
|
|
|
|
|
|
|
1197
|
|
|
|
|
|
|
void SvPOK_only_UTF8(SV* sv)','name' => 'SvPOK_only_UTF8'},'mg_get' => {'text' => 'Do magic after a value is retrieved from the SV. See C. |
1198
|
|
|
|
|
|
|
|
1199
|
|
|
|
|
|
|
int mg_get(SV* sv)','name' => 'mg_get'},'SvTRUE' => {'text' => 'Returns a boolean indicating whether Perl would evaluate the SV as true or |
1200
|
|
|
|
|
|
|
false. See SvOK() for a defined/undefined test. Does not handle \'get\' magic. |
1201
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
bool SvTRUE(SV* sv)','name' => 'SvTRUE'},'regdump' => {'text' => '','name' => 'regdump'},'my_pclose' => {'text' => '','name' => 'my_pclose'},'hv_iternext_flags' => {'text' => 'Returns entries from a hash iterator. See C and C. |
1203
|
|
|
|
|
|
|
The C value will normally be zero; if HV_ITERNEXT_WANTPLACEHOLDERS is |
1204
|
|
|
|
|
|
|
set the placeholders keys (for restricted hashes) will be returned in addition |
1205
|
|
|
|
|
|
|
to normal keys. By default placeholders are automatically skipped over. |
1206
|
|
|
|
|
|
|
Currently a placeholder is implemented with a value that is |
1207
|
|
|
|
|
|
|
C<&Perl_sv_placeholder>. Note that the implementation of placeholders and |
1208
|
|
|
|
|
|
|
restricted hashes may change, and the implementation currently is |
1209
|
|
|
|
|
|
|
insufficiently abstracted for any change to be tidy. |
1210
|
|
|
|
|
|
|
|
1211
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1212
|
|
|
|
|
|
|
removed without notice. |
1213
|
|
|
|
|
|
|
|
1214
|
|
|
|
|
|
|
HE* hv_iternext_flags(HV *hv, I32 flags)','name' => 'hv_iternext_flags'},'is_utf8_string_loclen' => {'text' => 'Like is_utf8_string() but stores the location of the failure (in the |
1215
|
|
|
|
|
|
|
case of "utf8ness failure") or the location s+len (in the case of |
1216
|
|
|
|
|
|
|
"utf8ness success") in the C, and the number of UTF-8 |
1217
|
|
|
|
|
|
|
encoded characters in the C. |
1218
|
|
|
|
|
|
|
|
1219
|
|
|
|
|
|
|
See also is_utf8_string_loc() and is_utf8_string(). |
1220
|
|
|
|
|
|
|
|
1221
|
|
|
|
|
|
|
bool is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)','name' => 'is_utf8_string_loclen'},'call_method' => {'text' => 'Performs a callback to the specified Perl method. The blessed object must |
1222
|
|
|
|
|
|
|
be on the stack. See L. |
1223
|
|
|
|
|
|
|
|
1224
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
I32 call_method(const char* methname, I32 flags)','name' => 'call_method'},'sys_init' => {'text' => '','name' => 'sys_init'},'perl_parse' => {'text' => 'Tells a Perl interpreter to parse a Perl script. See L. |
1227
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
int perl_parse(PerlInterpreter *my_perl, XSINIT_t xsinit, int argc, char** argv, char** env)','name' => 'perl_parse'},'av_clear' => {'text' => 'Clears an array, making it empty. Does not free the memory used by the |
1229
|
|
|
|
|
|
|
array itself. |
1230
|
|
|
|
|
|
|
|
1231
|
|
|
|
|
|
|
void av_clear(AV *av)','name' => 'av_clear'},'sv_force_normal' => {'text' => 'Undo various types of fakery on an SV: if the PV is a shared string, make |
1232
|
|
|
|
|
|
|
a private copy; if we\'re a ref, stop refing; if we\'re a glob, downgrade to |
1233
|
|
|
|
|
|
|
an xpvmg. See also C. |
1234
|
|
|
|
|
|
|
|
1235
|
|
|
|
|
|
|
void sv_force_normal(SV *sv)','name' => 'sv_force_normal'},'av_unshift' => {'text' => 'Unshift the given number of C values onto the beginning of the |
1236
|
|
|
|
|
|
|
array. The array will grow automatically to accommodate the addition. You |
1237
|
|
|
|
|
|
|
must then use C to assign values to these new elements. |
1238
|
|
|
|
|
|
|
|
1239
|
|
|
|
|
|
|
void av_unshift(AV *av, I32 num)','name' => 'av_unshift'},'save_set_svflags' => {'text' => '','name' => 'save_set_svflags'},'SvREFCNT_inc_NN' => {'text' => 'Same as SvREFCNT_inc, but can only be used if you know I |
1240
|
|
|
|
|
|
|
is not NULL. Since we don\'t have to check the NULLness, it\'s faster |
1241
|
|
|
|
|
|
|
and smaller. |
1242
|
|
|
|
|
|
|
|
1243
|
|
|
|
|
|
|
SV* SvREFCNT_inc_NN(SV* sv)','name' => 'SvREFCNT_inc_NN'},'sys_term' => {'text' => '','name' => 'sys_term'},'re_intuit_start' => {'text' => '','name' => 're_intuit_start'},'SvUVX' => {'text' => 'Returns the raw value in the SV\'s UV slot, without checks or conversions. |
1244
|
|
|
|
|
|
|
Only use when you are sure SvIOK is true. See also C. |
1245
|
|
|
|
|
|
|
|
1246
|
|
|
|
|
|
|
UV SvUVX(SV* sv)','name' => 'SvUVX'},'do_pmop_dump' => {'text' => '','name' => 'do_pmop_dump'},'sv_utf8_decode' => {'text' => 'If the PV of the SV is an octet sequence in UTF-8 |
1247
|
|
|
|
|
|
|
and contains a multiple-byte character, the C flag is turned on |
1248
|
|
|
|
|
|
|
so that it looks like a character. If the PV contains only single-byte |
1249
|
|
|
|
|
|
|
characters, the C flag stays being off. |
1250
|
|
|
|
|
|
|
Scans PV for validity and returns false if the PV is invalid UTF-8. |
1251
|
|
|
|
|
|
|
|
1252
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1253
|
|
|
|
|
|
|
removed without notice. |
1254
|
|
|
|
|
|
|
|
1255
|
|
|
|
|
|
|
bool sv_utf8_decode(SV *const sv)','name' => 'sv_utf8_decode'},'op_refcnt_unlock' => {'text' => '','name' => 'op_refcnt_unlock'},'hv_stores' => {'text' => 'Like C, but takes a literal string instead of a string/length pair |
1256
|
|
|
|
|
|
|
and omits the hash parameter. |
1257
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
SV** hv_stores(HV* tb, const char* key, NULLOK SV* val)','name' => 'hv_stores'},'eval_sv' => {'text' => 'Tells Perl to C the string in the SV. |
1259
|
|
|
|
|
|
|
|
1260
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1261
|
|
|
|
|
|
|
|
1262
|
|
|
|
|
|
|
I32 eval_sv(SV* sv, I32 flags)','name' => 'eval_sv'},'FREETMPS' => {'text' => 'Closing bracket for temporaries on a callback. See C and |
1263
|
|
|
|
|
|
|
L. |
1264
|
|
|
|
|
|
|
|
1265
|
|
|
|
|
|
|
FREETMPS;','name' => 'FREETMPS'},'sv_utf8_upgrade_nomg' => {'text' => 'Like sv_utf8_upgrade, but doesn\'t do magic on C |
1266
|
|
|
|
|
|
|
|
1267
|
|
|
|
|
|
|
STRLEN sv_utf8_upgrade_nomg(SV *sv)','name' => 'sv_utf8_upgrade_nomg'},'sv_pvn_force' => {'text' => 'Get a sensible string out of the SV somehow. |
1268
|
|
|
|
|
|
|
A private implementation of the C macro for compilers which |
1269
|
|
|
|
|
|
|
can\'t cope with complex macro expressions. Always use the macro instead. |
1270
|
|
|
|
|
|
|
|
1271
|
|
|
|
|
|
|
char* sv_pvn_force(SV* sv, STRLEN* lp)','name' => 'sv_pvn_force'},'GIMME' => {'text' => 'A backward-compatible version of C which can only return |
1272
|
|
|
|
|
|
|
C or C; in a void context, it returns C. |
1273
|
|
|
|
|
|
|
Deprecated. Use C instead. |
1274
|
|
|
|
|
|
|
|
1275
|
|
|
|
|
|
|
U32 GIMME','name' => 'GIMME'},'newLOGOP' => {'text' => '','name' => 'newLOGOP'},'my_snprintf' => {'text' => 'The C library C functionality, if available and |
1276
|
|
|
|
|
|
|
standards-compliant (uses C, actually). However, if the |
1277
|
|
|
|
|
|
|
C is not available, will unfortunately use the unsafe |
1278
|
|
|
|
|
|
|
C which can overrun the buffer (there is an overrun check, |
1279
|
|
|
|
|
|
|
but that may be too late). Consider using C instead, or |
1280
|
|
|
|
|
|
|
getting C. |
1281
|
|
|
|
|
|
|
|
1282
|
|
|
|
|
|
|
int my_snprintf(char *buffer, const Size_t len, const char *format, ...)','name' => 'my_snprintf'},'SvIOK_UV' => {'text' => 'Returns a boolean indicating whether the SV contains an unsigned integer. |
1283
|
|
|
|
|
|
|
|
1284
|
|
|
|
|
|
|
bool SvIOK_UV(SV* sv)','name' => 'SvIOK_UV'},'gp_ref' => {'text' => '','name' => 'gp_ref'},'perl_construct' => {'text' => 'Initializes a new Perl interpreter. See L. |
1285
|
|
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
void perl_construct(PerlInterpreter *my_perl)','name' => 'perl_construct'},'newWHENOP' => {'text' => '','name' => 'newWHENOP'},'SvUOK' => {'text' => 'Returns a boolean indicating whether the SV contains an unsigned integer. |
1287
|
|
|
|
|
|
|
|
1288
|
|
|
|
|
|
|
bool SvUOK(SV* sv)','name' => 'SvUOK'},'sv_dec' => {'text' => 'Auto-decrement of the value in the SV, doing string to numeric conversion |
1289
|
|
|
|
|
|
|
if necessary. Handles \'get\' magic. |
1290
|
|
|
|
|
|
|
|
1291
|
|
|
|
|
|
|
void sv_dec(SV *const sv)','name' => 'sv_dec'},'pv_display' => {'text' => 'Similar to |
1292
|
|
|
|
|
|
|
|
1293
|
|
|
|
|
|
|
pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE); |
1294
|
|
|
|
|
|
|
|
1295
|
|
|
|
|
|
|
except that an additional "\\0" will be appended to the string when |
1296
|
|
|
|
|
|
|
len > cur and pv[cur] is "\\0". |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
Note that the final string may be up to 7 chars longer than pvlim. |
1299
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
char* pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)','name' => 'pv_display'},'newHVREF' => {'text' => '','name' => 'newHVREF'},'sv_2pvbyte_nolen' => {'text' => 'Return a pointer to the byte-encoded representation of the SV. |
1301
|
|
|
|
|
|
|
May cause the SV to be downgraded from UTF-8 as a side-effect. |
1302
|
|
|
|
|
|
|
|
1303
|
|
|
|
|
|
|
Usually accessed via the C macro. |
1304
|
|
|
|
|
|
|
|
1305
|
|
|
|
|
|
|
char* sv_2pvbyte_nolen(SV* sv)','name' => 'sv_2pvbyte_nolen'},'is_uni_space' => {'text' => '','name' => 'is_uni_space'},'PerlIO_fileno' => {'text' => '','name' => 'PerlIO_fileno'},'uvchr_to_utf8' => {'text' => 'Adds the UTF-8 representation of the Native codepoint C to the end |
1306
|
|
|
|
|
|
|
of the string C; C should be have at least C free |
1307
|
|
|
|
|
|
|
bytes available. The return value is the pointer to the byte after the |
1308
|
|
|
|
|
|
|
end of the new character. In other words, |
1309
|
|
|
|
|
|
|
|
1310
|
|
|
|
|
|
|
d = uvchr_to_utf8(d, uv); |
1311
|
|
|
|
|
|
|
|
1312
|
|
|
|
|
|
|
is the recommended wide native character-aware way of saying |
1313
|
|
|
|
|
|
|
|
1314
|
|
|
|
|
|
|
*(d++) = uv; |
1315
|
|
|
|
|
|
|
|
1316
|
|
|
|
|
|
|
U8* uvchr_to_utf8(U8 *d, UV uv)','name' => 'uvchr_to_utf8'},'isDIGIT' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
1317
|
|
|
|
|
|
|
digit. |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
bool isDIGIT(char ch)','name' => 'isDIGIT'},'call_atexit' => {'text' => '','name' => 'call_atexit'},'is_utf8_alpha' => {'text' => '','name' => 'is_utf8_alpha'},'my_bzero' => {'text' => '','name' => 'my_bzero'},'newCONSTSUB' => {'text' => 'Creates a constant sub equivalent to Perl C which is |
1320
|
|
|
|
|
|
|
eligible for inlining at compile-time. |
1321
|
|
|
|
|
|
|
|
1322
|
|
|
|
|
|
|
Passing NULL for SV creates a constant sub equivalent to C, |
1323
|
|
|
|
|
|
|
which won\'t be called if used as a destructor, but will suppress the overhead |
1324
|
|
|
|
|
|
|
of a call to C. (This form, however, isn\'t eligible for inlining at |
1325
|
|
|
|
|
|
|
compile time.) |
1326
|
|
|
|
|
|
|
|
1327
|
|
|
|
|
|
|
CV* newCONSTSUB(HV* stash, const char* name, SV* sv)','name' => 'newCONSTSUB'},'SvSHARE' => {'text' => 'Arranges for sv to be shared between threads if a suitable module |
1328
|
|
|
|
|
|
|
has been loaded. |
1329
|
|
|
|
|
|
|
|
1330
|
|
|
|
|
|
|
void SvSHARE(SV* sv)','name' => 'SvSHARE'},'vwarner' => {'text' => '','name' => 'vwarner'},'sortsv' => {'text' => 'Sort an array. Here is an example: |
1331
|
|
|
|
|
|
|
|
1332
|
|
|
|
|
|
|
sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale); |
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
Currently this always uses mergesort. See sortsv_flags for a more |
1335
|
|
|
|
|
|
|
flexible routine. |
1336
|
|
|
|
|
|
|
|
1337
|
|
|
|
|
|
|
void sortsv(SV** array, size_t num_elts, SVCOMPARE_t cmp)','name' => 'sortsv'},'sys_intern_clear' => {'text' => '','name' => 'sys_intern_clear'},'my_ntohl' => {'text' => '','name' => 'my_ntohl'},'doref' => {'text' => '','name' => 'doref'},'scan_bin' => {'text' => 'For backwards compatibility. Use C instead. |
1338
|
|
|
|
|
|
|
|
1339
|
|
|
|
|
|
|
NV scan_bin(const char* start, STRLEN len, STRLEN* retlen)','name' => 'scan_bin'},'Nullcv' => {'text' => 'Null CV pointer. |
1340
|
|
|
|
|
|
|
|
1341
|
|
|
|
|
|
|
(deprecated - use C<(CV *)NULL> instead)','name' => 'Nullcv'},'lex_bufutf8' => {'text' => 'Indicates whether the octets in the lexer buffer |
1342
|
|
|
|
|
|
|
(Llinestr>) should be interpreted as the UTF-8 encoding |
1343
|
|
|
|
|
|
|
of Unicode characters. If not, they should be interpreted as Latin-1 |
1344
|
|
|
|
|
|
|
characters. This is analogous to the C flag for scalars. |
1345
|
|
|
|
|
|
|
|
1346
|
|
|
|
|
|
|
In UTF-8 mode, it is not guaranteed that the lexer buffer actually |
1347
|
|
|
|
|
|
|
contains valid UTF-8. Lexing code must be robust in the face of invalid |
1348
|
|
|
|
|
|
|
encoding. |
1349
|
|
|
|
|
|
|
|
1350
|
|
|
|
|
|
|
The actual C flag of the Llinestr> scalar |
1351
|
|
|
|
|
|
|
is significant, but not the whole story regarding the input character |
1352
|
|
|
|
|
|
|
encoding. Normally, when a file is being read, the scalar contains octets |
1353
|
|
|
|
|
|
|
and its C flag is off, but the octets should be interpreted as |
1354
|
|
|
|
|
|
|
UTF-8 if the C |
1355
|
|
|
|
|
|
|
however, the scalar may have the C flag on, and in this case its |
1356
|
|
|
|
|
|
|
octets should be interpreted as UTF-8 unless the C |
1357
|
|
|
|
|
|
|
is in effect. This logic may change in the future; use this function |
1358
|
|
|
|
|
|
|
instead of implementing the logic yourself. |
1359
|
|
|
|
|
|
|
|
1360
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1361
|
|
|
|
|
|
|
removed without notice. |
1362
|
|
|
|
|
|
|
|
1363
|
|
|
|
|
|
|
bool lex_bufutf8()','name' => 'lex_bufutf8'},'MULTICALL' => {'text' => 'Make a lightweight callback. See L. |
1364
|
|
|
|
|
|
|
|
1365
|
|
|
|
|
|
|
MULTICALL;','name' => 'MULTICALL'},'debprofdump' => {'text' => '','name' => 'debprofdump'},'SvPVbyte' => {'text' => 'Like C, but converts sv to byte representation first if necessary. |
1366
|
|
|
|
|
|
|
|
1367
|
|
|
|
|
|
|
char* SvPVbyte(SV* sv, STRLEN len)','name' => 'SvPVbyte'},'is_uni_lower' => {'text' => '','name' => 'is_uni_lower'},'sys_init3' => {'text' => '','name' => 'sys_init3'},'PerlIO_stdout' => {'text' => '','name' => 'PerlIO_stdout'},'SAVETMPS' => {'text' => 'Opening bracket for temporaries on a callback. See C and |
1368
|
|
|
|
|
|
|
L. |
1369
|
|
|
|
|
|
|
|
1370
|
|
|
|
|
|
|
SAVETMPS;','name' => 'SAVETMPS'},'AvFILL' => {'text' => 'Same as C. Deprecated, use C instead. |
1371
|
|
|
|
|
|
|
|
1372
|
|
|
|
|
|
|
int AvFILL(AV* av)','name' => 'AvFILL'},'ORIGMARK' => {'text' => 'The original stack mark for the XSUB. See C.','name' => 'ORIGMARK'},'SvPVutf8x' => {'text' => 'Like C, but converts sv to utf8 first if necessary. |
1373
|
|
|
|
|
|
|
Guarantees to evaluate sv only once; use the more efficient C |
1374
|
|
|
|
|
|
|
otherwise. |
1375
|
|
|
|
|
|
|
|
1376
|
|
|
|
|
|
|
char* SvPVutf8x(SV* sv, STRLEN len)','name' => 'SvPVutf8x'},'sv_2cv' => {'text' => 'Using various gambits, try to get a CV from an SV; in addition, try if |
1377
|
|
|
|
|
|
|
possible to set C<*st> and C<*gvp> to the stash and GV associated with it. |
1378
|
|
|
|
|
|
|
The flags in C are passed to gv_fetchsv. |
1379
|
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
CV* sv_2cv(SV* sv, HV **const st, GV **const gvp, const I32 lref)','name' => 'sv_2cv'},'gp_free' => {'text' => '','name' => 'gp_free'},'SvPV_force_nomg' => {'text' => 'Like C but will force the SV into containing just a string |
1381
|
|
|
|
|
|
|
(C). You want force if you are going to update the C |
1382
|
|
|
|
|
|
|
directly. Doesn\'t process magic. |
1383
|
|
|
|
|
|
|
|
1384
|
|
|
|
|
|
|
char* SvPV_force_nomg(SV* sv, STRLEN len)','name' => 'SvPV_force_nomg'},'SvPOK_only' => {'text' => 'Tells an SV that it is a string and disables all other OK bits. |
1385
|
|
|
|
|
|
|
Will also turn off the UTF-8 status. |
1386
|
|
|
|
|
|
|
|
1387
|
|
|
|
|
|
|
void SvPOK_only(SV* sv)','name' => 'SvPOK_only'},'save_destructor_x' => {'text' => '','name' => 'save_destructor_x'},'sv_usepvn_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
1388
|
|
|
|
|
|
|
|
1389
|
|
|
|
|
|
|
void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len)','name' => 'sv_usepvn_mg'},'sv_pvbyte' => {'text' => 'Use C instead. |
1390
|
|
|
|
|
|
|
|
1391
|
|
|
|
|
|
|
char* sv_pvbyte(SV *sv)','name' => 'sv_pvbyte'},'hv_fetch' => {'text' => 'Returns the SV which corresponds to the specified key in the hash. The |
1392
|
|
|
|
|
|
|
C is the length of the key. If C is set then the fetch will be |
1393
|
|
|
|
|
|
|
part of a store. Check that the return value is non-null before |
1394
|
|
|
|
|
|
|
dereferencing it to an C. |
1395
|
|
|
|
|
|
|
|
1396
|
|
|
|
|
|
|
See L for more |
1397
|
|
|
|
|
|
|
information on how to use this function on tied hashes. |
1398
|
|
|
|
|
|
|
|
1399
|
|
|
|
|
|
|
SV** hv_fetch(HV *hv, const char *key, I32 klen, I32 lval)','name' => 'hv_fetch'},'XCPT_TRY_START' => {'text' => 'Starts a try block. See L.','name' => 'XCPT_TRY_START'},'sv_unref_flags' => {'text' => 'Unsets the RV status of the SV, and decrements the reference count of |
1400
|
|
|
|
|
|
|
whatever was being referenced by the RV. This can almost be thought of |
1401
|
|
|
|
|
|
|
as a reversal of C. The C argument can contain |
1402
|
|
|
|
|
|
|
C to force the reference count to be decremented |
1403
|
|
|
|
|
|
|
(otherwise the decrementing is conditional on the reference count being |
1404
|
|
|
|
|
|
|
different from one or the reference being a readonly SV). |
1405
|
|
|
|
|
|
|
See C. |
1406
|
|
|
|
|
|
|
|
1407
|
|
|
|
|
|
|
void sv_unref_flags(SV *const ref, const U32 flags)','name' => 'sv_unref_flags'},'hv_scalar' => {'text' => 'Evaluates the hash in scalar context and returns the result. Handles magic when the hash is tied. |
1408
|
|
|
|
|
|
|
|
1409
|
|
|
|
|
|
|
SV* hv_scalar(HV *hv)','name' => 'hv_scalar'},'SvRV' => {'text' => 'Dereferences an RV to return the SV. |
1410
|
|
|
|
|
|
|
|
1411
|
|
|
|
|
|
|
SV* SvRV(SV* sv)','name' => 'SvRV'},'mg_copy' => {'text' => 'Copies the magic from one SV to another. See C. |
1412
|
|
|
|
|
|
|
|
1413
|
|
|
|
|
|
|
int mg_copy(SV *sv, SV *nsv, const char *key, I32 klen)','name' => 'mg_copy'},'save_I16' => {'text' => '','name' => 'save_I16'},'grok_oct' => {'text' => 'converts a string representing an octal number to numeric form. |
1414
|
|
|
|
|
|
|
|
1415
|
|
|
|
|
|
|
On entry I and I<*len> give the string to scan, I<*flags> gives |
1416
|
|
|
|
|
|
|
conversion flags, and I should be NULL or a pointer to an NV. |
1417
|
|
|
|
|
|
|
The scan stops at the end of the string, or the first invalid character. |
1418
|
|
|
|
|
|
|
Unless C is set in I<*flags>, encountering an |
1419
|
|
|
|
|
|
|
invalid character will also trigger a warning. |
1420
|
|
|
|
|
|
|
On return I<*len> is set to the length of the scanned string, |
1421
|
|
|
|
|
|
|
and I<*flags> gives output flags. |
1422
|
|
|
|
|
|
|
|
1423
|
|
|
|
|
|
|
If the value is <= UV_MAX it is returned as a UV, the output flags are clear, |
1424
|
|
|
|
|
|
|
and nothing is written to I<*result>. If the value is > UV_MAX C |
1425
|
|
|
|
|
|
|
returns UV_MAX, sets C in the output flags, |
1426
|
|
|
|
|
|
|
and writes the value to I<*result> (or the value is discarded if I |
1427
|
|
|
|
|
|
|
is NULL). |
1428
|
|
|
|
|
|
|
|
1429
|
|
|
|
|
|
|
If C is set in I<*flags> then the octal |
1430
|
|
|
|
|
|
|
number may use \'_\' characters to separate digits. |
1431
|
|
|
|
|
|
|
|
1432
|
|
|
|
|
|
|
UV grok_oct(const char* start, STRLEN* len_p, I32* flags, NV *result)','name' => 'grok_oct'},'MARK' => {'text' => 'Stack marker variable for the XSUB. See C.','name' => 'MARK'},'sv_rvweaken' => {'text' => 'Weaken a reference: set the C flag on this RV; give the |
1433
|
|
|
|
|
|
|
referred-to SV C magic if it hasn\'t already; and |
1434
|
|
|
|
|
|
|
push a back-reference to this RV onto the array of backreferences |
1435
|
|
|
|
|
|
|
associated with that magic. If the RV is magical, set magic will be |
1436
|
|
|
|
|
|
|
called after the RV is cleared. |
1437
|
|
|
|
|
|
|
|
1438
|
|
|
|
|
|
|
SV* sv_rvweaken(SV *const sv)','name' => 'sv_rvweaken'},'scan_hex' => {'text' => 'For backwards compatibility. Use C instead. |
1439
|
|
|
|
|
|
|
|
1440
|
|
|
|
|
|
|
NV scan_hex(const char* start, STRLEN len, STRLEN* retlen)','name' => 'scan_hex'},'newSVpvn' => {'text' => 'Creates a new SV and copies a string into it. The reference count for the |
1441
|
|
|
|
|
|
|
SV is set to 1. Note that if C is zero, Perl will create a zero length |
1442
|
|
|
|
|
|
|
string. You are responsible for ensuring that the source string is at least |
1443
|
|
|
|
|
|
|
C bytes long. If the C argument is NULL the new SV will be undefined. |
1444
|
|
|
|
|
|
|
|
1445
|
|
|
|
|
|
|
SV* newSVpvn(const char *const s, const STRLEN len)','name' => 'newSVpvn'},'unpackstring' => {'text' => 'The engine implementing unpack() Perl function. C puts the |
1446
|
|
|
|
|
|
|
extracted list items on the stack and returns the number of elements. |
1447
|
|
|
|
|
|
|
Issue C before and C after the call to this function. |
1448
|
|
|
|
|
|
|
|
1449
|
|
|
|
|
|
|
I32 unpackstring(const char *pat, const char *patend, const char *s, const char *strend, U32 flags)','name' => 'unpackstring'},'av_extend' => {'text' => 'Pre-extend an array. The C is the index to which the array should be |
1450
|
|
|
|
|
|
|
extended. |
1451
|
|
|
|
|
|
|
|
1452
|
|
|
|
|
|
|
void av_extend(AV *av, I32 key)','name' => 'av_extend'},'sv_peek' => {'text' => '','name' => 'sv_peek'},'hv_iternext' => {'text' => 'Returns entries from a hash iterator. See C. |
1453
|
|
|
|
|
|
|
|
1454
|
|
|
|
|
|
|
You may call C or C on the hash entry that the |
1455
|
|
|
|
|
|
|
iterator currently points to, without losing your place or invalidating your |
1456
|
|
|
|
|
|
|
iterator. Note that in this case the current entry is deleted from the hash |
1457
|
|
|
|
|
|
|
with your iterator holding the last reference to it. Your iterator is flagged |
1458
|
|
|
|
|
|
|
to free the entry on the next call to C, so you must not discard |
1459
|
|
|
|
|
|
|
your iterator immediately else the entry will leak - call C to |
1460
|
|
|
|
|
|
|
trigger the resource deallocation. |
1461
|
|
|
|
|
|
|
|
1462
|
|
|
|
|
|
|
HE* hv_iternext(HV *hv)','name' => 'hv_iternext'},'hv_store_ent' => {'text' => 'Stores C in a hash. The hash key is specified as C. The C |
1463
|
|
|
|
|
|
|
parameter is the precomputed hash value; if it is zero then Perl will |
1464
|
|
|
|
|
|
|
compute it. The return value is the new hash entry so created. It will be |
1465
|
|
|
|
|
|
|
NULL if the operation failed or if the value did not need to be actually |
1466
|
|
|
|
|
|
|
stored within the hash (as in the case of tied hashes). Otherwise the |
1467
|
|
|
|
|
|
|
contents of the return value can be accessed using the C macros |
1468
|
|
|
|
|
|
|
described here. Note that the caller is responsible for suitably |
1469
|
|
|
|
|
|
|
incrementing the reference count of C before the call, and |
1470
|
|
|
|
|
|
|
decrementing it if the function returned NULL. Effectively a successful |
1471
|
|
|
|
|
|
|
hv_store_ent takes ownership of one reference to C. This is |
1472
|
|
|
|
|
|
|
usually what you want; a newly created SV has a reference count of one, so |
1473
|
|
|
|
|
|
|
if all your code does is create SVs then store them in a hash, hv_store |
1474
|
|
|
|
|
|
|
will own the only reference to the new SV, and your code doesn\'t need to do |
1475
|
|
|
|
|
|
|
anything further to tidy up. Note that hv_store_ent only reads the C; |
1476
|
|
|
|
|
|
|
unlike C it does not take ownership of it, so maintaining the correct |
1477
|
|
|
|
|
|
|
reference count on C is entirely the caller\'s responsibility. hv_store |
1478
|
|
|
|
|
|
|
is not implemented as a call to hv_store_ent, and does not create a temporary |
1479
|
|
|
|
|
|
|
SV for the key, so if your key data is not already in SV form then use |
1480
|
|
|
|
|
|
|
hv_store in preference to hv_store_ent. |
1481
|
|
|
|
|
|
|
|
1482
|
|
|
|
|
|
|
See L for more |
1483
|
|
|
|
|
|
|
information on how to use this function on tied hashes. |
1484
|
|
|
|
|
|
|
|
1485
|
|
|
|
|
|
|
HE* hv_store_ent(HV *hv, SV *key, SV *val, U32 hash)','name' => 'hv_store_ent'},'hv_eiter_set' => {'text' => '','name' => 'hv_eiter_set'},'gv_stashsv' => {'text' => 'Returns a pointer to the stash for a specified package. See C. |
1486
|
|
|
|
|
|
|
|
1487
|
|
|
|
|
|
|
HV* gv_stashsv(SV* sv, I32 flags)','name' => 'gv_stashsv'},'newXSproto' => {'text' => 'Used by C to hook up XSUBs as Perl subs. Adds Perl prototypes to |
1488
|
|
|
|
|
|
|
the subs.','name' => 'newXSproto'},'form' => {'text' => 'Takes a sprintf-style format pattern and conventional |
1489
|
|
|
|
|
|
|
(non-SV) arguments and returns the formatted string. |
1490
|
|
|
|
|
|
|
|
1491
|
|
|
|
|
|
|
(char *) Perl_form(pTHX_ const char* pat, ...) |
1492
|
|
|
|
|
|
|
|
1493
|
|
|
|
|
|
|
can be used any place a string (char *) is required: |
1494
|
|
|
|
|
|
|
|
1495
|
|
|
|
|
|
|
char * s = Perl_form("%d.%d",major,minor); |
1496
|
|
|
|
|
|
|
|
1497
|
|
|
|
|
|
|
Uses a single private buffer so if you want to format several strings you |
1498
|
|
|
|
|
|
|
must explicitly copy the earlier strings away (and free the copies when you |
1499
|
|
|
|
|
|
|
are done). |
1500
|
|
|
|
|
|
|
|
1501
|
|
|
|
|
|
|
char* form(const char* pat, ...)','name' => 'form'},'instr' => {'text' => '','name' => 'instr'},'pregexec' => {'text' => '','name' => 'pregexec'},'is_utf8_string' => {'text' => 'Returns true if first C bytes of the given string form a valid |
1502
|
|
|
|
|
|
|
UTF-8 string, false otherwise. Note that \'a valid UTF-8 string\' does |
1503
|
|
|
|
|
|
|
not mean \'a string that contains code points above 0x7F encoded in UTF-8\' |
1504
|
|
|
|
|
|
|
because a valid ASCII string is a valid UTF-8 string. |
1505
|
|
|
|
|
|
|
|
1506
|
|
|
|
|
|
|
See also is_ascii_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). |
1507
|
|
|
|
|
|
|
|
1508
|
|
|
|
|
|
|
bool is_utf8_string(const U8 *s, STRLEN len)','name' => 'is_utf8_string'},'croak_xs_usage' => {'text' => 'A specialised variant of C for emitting the usage message for xsubs |
1509
|
|
|
|
|
|
|
|
1510
|
|
|
|
|
|
|
croak_xs_usage(cv, "eee_yow"); |
1511
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
works out the package name and subroutine name from C, and then calls |
1513
|
|
|
|
|
|
|
C. Hence if C is C<&ouch::awk>, it would call C as: |
1514
|
|
|
|
|
|
|
|
1515
|
|
|
|
|
|
|
Perl_croak(aTHX_ "Usage %s::%s(%s)", "ouch" "awk", "eee_yow"); |
1516
|
|
|
|
|
|
|
|
1517
|
|
|
|
|
|
|
void croak_xs_usage(const CV *const cv, const char *const params)','name' => 'croak_xs_usage'},'sv_insert' => {'text' => 'Inserts a string at the specified offset/length within the SV. Similar to |
1518
|
|
|
|
|
|
|
the Perl substr() function. Handles get magic. |
1519
|
|
|
|
|
|
|
|
1520
|
|
|
|
|
|
|
void sv_insert(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen)','name' => 'sv_insert'},'SvPOK' => {'text' => 'Returns a U32 value indicating whether the SV contains a character |
1521
|
|
|
|
|
|
|
string. |
1522
|
|
|
|
|
|
|
|
1523
|
|
|
|
|
|
|
U32 SvPOK(SV* sv)','name' => 'SvPOK'},'pad_findmy' => {'text' => 'Given a lexical name, try to find its offset, first in the current pad, |
1524
|
|
|
|
|
|
|
or failing that, in the pads of any lexically enclosing subs (including |
1525
|
|
|
|
|
|
|
the complications introduced by eval). If the name is found in an outer pad, |
1526
|
|
|
|
|
|
|
then a fake entry is added to the current pad. |
1527
|
|
|
|
|
|
|
Returns the offset in the current pad, or NOT_IN_PAD on failure. |
1528
|
|
|
|
|
|
|
|
1529
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1530
|
|
|
|
|
|
|
removed without notice. |
1531
|
|
|
|
|
|
|
|
1532
|
|
|
|
|
|
|
PADOFFSET pad_findmy(const char* name, STRLEN len, U32 flags)','name' => 'pad_findmy'},'sv_destroyable' => {'text' => 'Dummy routine which reports that object can be destroyed when there is no |
1533
|
|
|
|
|
|
|
sharing module present. It ignores its single SV argument, and returns |
1534
|
|
|
|
|
|
|
\'true\'. Exists to avoid test for a NULL function pointer and because it |
1535
|
|
|
|
|
|
|
could potentially warn under some level of strict-ness. |
1536
|
|
|
|
|
|
|
|
1537
|
|
|
|
|
|
|
bool sv_destroyable(SV *sv)','name' => 'sv_destroyable'},'save_aelem_flags' => {'text' => '','name' => 'save_aelem_flags'},'XS' => {'text' => 'Macro to declare an XSUB and its C parameter list. This is handled by |
1538
|
|
|
|
|
|
|
C.','name' => 'XS'},'gv_check' => {'text' => '','name' => 'gv_check'},'sv_setpvn' => {'text' => 'Copies a string into an SV. The C parameter indicates the number of |
1539
|
|
|
|
|
|
|
bytes to be copied. If the C argument is NULL the SV will become |
1540
|
|
|
|
|
|
|
undefined. Does not handle \'set\' magic. See C. |
1541
|
|
|
|
|
|
|
|
1542
|
|
|
|
|
|
|
void sv_setpvn(SV *const sv, const char *const ptr, const STRLEN len)','name' => 'sv_setpvn'},'mg_magical' => {'text' => 'Turns on the magical status of an SV. See C. |
1543
|
|
|
|
|
|
|
|
1544
|
|
|
|
|
|
|
void mg_magical(SV* sv)','name' => 'mg_magical'},'newSVrv' => {'text' => 'Creates a new SV for the RV, C, to point to. If C is not an RV then |
1545
|
|
|
|
|
|
|
it will be upgraded to one. If C is non-null then the new SV will |
1546
|
|
|
|
|
|
|
be blessed in the specified package. The new SV is returned and its |
1547
|
|
|
|
|
|
|
reference count is 1. |
1548
|
|
|
|
|
|
|
|
1549
|
|
|
|
|
|
|
SV* newSVrv(SV *const rv, const char *const classname)','name' => 'newSVrv'},'cast_i32' => {'text' => '','name' => 'cast_i32'},'is_utf8_posix_digit' => {'text' => '','name' => 'is_utf8_posix_digit'},'strnEQ' => {'text' => 'Test two strings to see if they are equal. The C parameter indicates |
1550
|
|
|
|
|
|
|
the number of bytes to compare. Returns true or false. (A wrapper for |
1551
|
|
|
|
|
|
|
C). |
1552
|
|
|
|
|
|
|
|
1553
|
|
|
|
|
|
|
bool strnEQ(char* s1, char* s2, STRLEN len)','name' => 'strnEQ'},'stashpv_hvname_match' => {'text' => '','name' => 'stashpv_hvname_match'},'newMYSUB' => {'text' => '','name' => 'newMYSUB'},'PoisonWith' => {'text' => 'Fill up memory with a byte pattern (a byte repeated over and over |
1554
|
|
|
|
|
|
|
again) that hopefully catches attempts to access uninitialized memory. |
1555
|
|
|
|
|
|
|
|
1556
|
|
|
|
|
|
|
void PoisonWith(void* dest, int nitems, type, U8 byte)','name' => 'PoisonWith'},'av_create_and_unshift_one' => {'text' => 'Unshifts an SV onto the beginning of the array, creating the array if |
1557
|
|
|
|
|
|
|
necessary. |
1558
|
|
|
|
|
|
|
A small internal helper function to remove a commonly duplicated idiom. |
1559
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1561
|
|
|
|
|
|
|
removed without notice. |
1562
|
|
|
|
|
|
|
|
1563
|
|
|
|
|
|
|
SV** av_create_and_unshift_one(AV **const avp, SV *const val)','name' => 'av_create_and_unshift_one'},'SvNIOK_off' => {'text' => 'Unsets the NV/IV status of an SV. |
1564
|
|
|
|
|
|
|
|
1565
|
|
|
|
|
|
|
void SvNIOK_off(SV* sv)','name' => 'SvNIOK_off'},'is_uni_lower_lc' => {'text' => '','name' => 'is_uni_lower_lc'},'seed' => {'text' => '','name' => 'seed'},'sv_magic' => {'text' => 'Adds magic to an SV. First upgrades C to type C if necessary, |
1566
|
|
|
|
|
|
|
then adds a new magic item of type C to the head of the magic list. |
1567
|
|
|
|
|
|
|
|
1568
|
|
|
|
|
|
|
See C (which C now calls) for a description of the |
1569
|
|
|
|
|
|
|
handling of the C and C arguments. |
1570
|
|
|
|
|
|
|
|
1571
|
|
|
|
|
|
|
You need to use C to add magic to SvREADONLY SVs and also |
1572
|
|
|
|
|
|
|
to add more than one instance of the same \'how\'. |
1573
|
|
|
|
|
|
|
|
1574
|
|
|
|
|
|
|
void sv_magic(SV *const sv, SV *const obj, const int how, const char *const name, const I32 namlen)','name' => 'sv_magic'},'sv_utf8_upgrade_flags' => {'text' => 'Converts the PV of an SV to its UTF-8-encoded form. |
1575
|
|
|
|
|
|
|
Forces the SV to string form if it is not already. |
1576
|
|
|
|
|
|
|
Always sets the SvUTF8 flag to avoid future validity checks even |
1577
|
|
|
|
|
|
|
if all the bytes are invariant in UTF-8. If C has C bit set, |
1578
|
|
|
|
|
|
|
will C on C if appropriate, else not. |
1579
|
|
|
|
|
|
|
Returns the number of bytes in the converted string |
1580
|
|
|
|
|
|
|
C and |
1581
|
|
|
|
|
|
|
C are implemented in terms of this function. |
1582
|
|
|
|
|
|
|
|
1583
|
|
|
|
|
|
|
This is not as a general purpose byte encoding to Unicode interface: |
1584
|
|
|
|
|
|
|
use the Encode extension for that. |
1585
|
|
|
|
|
|
|
|
1586
|
|
|
|
|
|
|
STRLEN sv_utf8_upgrade_flags(SV *const sv, const I32 flags)','name' => 'sv_utf8_upgrade_flags'},'do_open9' => {'text' => '','name' => 'do_open9'},'magic_dump' => {'text' => '','name' => 'magic_dump'},'gv_fetchfile_flags' => {'text' => '','name' => 'gv_fetchfile_flags'},'SvREFCNT_inc_void' => {'text' => 'Same as SvREFCNT_inc, but can only be used if you don\'t need the |
1587
|
|
|
|
|
|
|
return value. The macro doesn\'t need to return a meaningful value. |
1588
|
|
|
|
|
|
|
|
1589
|
|
|
|
|
|
|
void SvREFCNT_inc_void(SV* sv)','name' => 'SvREFCNT_inc_void'},'leave_scope' => {'text' => '','name' => 'leave_scope'},'newSTATEOP' => {'text' => '','name' => 'newSTATEOP'},'my_fork' => {'text' => '','name' => 'my_fork'},'SvROK' => {'text' => 'Tests if the SV is an RV. |
1590
|
|
|
|
|
|
|
|
1591
|
|
|
|
|
|
|
U32 SvROK(SV* sv)','name' => 'SvROK'},'sv_unref' => {'text' => 'Unsets the RV status of the SV, and decrements the reference count of |
1592
|
|
|
|
|
|
|
whatever was being referenced by the RV. This can almost be thought of |
1593
|
|
|
|
|
|
|
as a reversal of C. This is C with the C |
1594
|
|
|
|
|
|
|
being zero. See C. |
1595
|
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
void sv_unref(SV* sv)','name' => 'sv_unref'},'moreswitches' => {'text' => '','name' => 'moreswitches'},'ptr_table_fetch' => {'text' => '','name' => 'ptr_table_fetch'},'save_nogv' => {'text' => '','name' => 'save_nogv'},'sv_setnv' => {'text' => 'Copies a double into the given SV, upgrading first if necessary. |
1597
|
|
|
|
|
|
|
Does not handle \'set\' magic. See also C. |
1598
|
|
|
|
|
|
|
|
1599
|
|
|
|
|
|
|
void sv_setnv(SV *const sv, const NV num)','name' => 'sv_setnv'},'is_utf8_mark' => {'text' => '','name' => 'is_utf8_mark'},'SvREFCNT_inc_simple_NN' => {'text' => 'Same as SvREFCNT_inc_simple, but can only be used if you know I |
1600
|
|
|
|
|
|
|
is not NULL. Since we don\'t have to check the NULLness, it\'s faster |
1601
|
|
|
|
|
|
|
and smaller. |
1602
|
|
|
|
|
|
|
|
1603
|
|
|
|
|
|
|
SV* SvREFCNT_inc_simple_NN(SV* sv)','name' => 'SvREFCNT_inc_simple_NN'},'newHV' => {'text' => 'Creates a new HV. The reference count is set to 1. |
1604
|
|
|
|
|
|
|
|
1605
|
|
|
|
|
|
|
HV* newHV()','name' => 'newHV'},'gv_dump' => {'text' => '','name' => 'gv_dump'},'strNE' => {'text' => 'Test two strings to see if they are different. Returns true or |
1606
|
|
|
|
|
|
|
false. |
1607
|
|
|
|
|
|
|
|
1608
|
|
|
|
|
|
|
bool strNE(char* s1, char* s2)','name' => 'strNE'},'my_strlcpy' => {'text' => '','name' => 'my_strlcpy'},'PerlIO_fill' => {'text' => '','name' => 'PerlIO_fill'},'my_failure_exit' => {'text' => '','name' => 'my_failure_exit'},'sv_pvutf8n_force' => {'text' => 'The backend for the C macro. Always use the macro instead. |
1609
|
|
|
|
|
|
|
|
1610
|
|
|
|
|
|
|
char* sv_pvutf8n_force(SV *const sv, STRLEN *const lp)','name' => 'sv_pvutf8n_force'},'do_sv_dump' => {'text' => '','name' => 'do_sv_dump'},'SvNV_set' => {'text' => 'Set the value of the NV pointer in sv to val. See C. |
1611
|
|
|
|
|
|
|
|
1612
|
|
|
|
|
|
|
void SvNV_set(SV* sv, NV val)','name' => 'SvNV_set'},'newAV' => {'text' => 'Creates a new AV. The reference count is set to 1. |
1613
|
|
|
|
|
|
|
|
1614
|
|
|
|
|
|
|
AV* newAV()','name' => 'newAV'},'bytes_from_utf8' => {'text' => 'Converts a string C of length C from UTF-8 into native byte encoding. |
1615
|
|
|
|
|
|
|
Unlike C but like C, returns a pointer to |
1616
|
|
|
|
|
|
|
the newly-created string, and updates C to contain the new |
1617
|
|
|
|
|
|
|
length. Returns the original string if no conversion occurs, C |
1618
|
|
|
|
|
|
|
is unchanged. Do nothing if C points to 0. Sets C to |
1619
|
|
|
|
|
|
|
0 if C is converted or consisted entirely of characters that are invariant |
1620
|
|
|
|
|
|
|
in utf8 (i.e., US-ASCII on non-EBCDIC machines). |
1621
|
|
|
|
|
|
|
|
1622
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1623
|
|
|
|
|
|
|
removed without notice. |
1624
|
|
|
|
|
|
|
|
1625
|
|
|
|
|
|
|
U8* bytes_from_utf8(const U8 *s, STRLEN *len, bool *is_utf8)','name' => 'bytes_from_utf8'},'dump_sub' => {'text' => '','name' => 'dump_sub'},'vload_module' => {'text' => '','name' => 'vload_module'},'save_adelete' => {'text' => '','name' => 'save_adelete'},'av_make' => {'text' => 'Creates a new AV and populates it with a list of SVs. The SVs are copied |
1626
|
|
|
|
|
|
|
into the array, so they may be freed after the call to av_make. The new AV |
1627
|
|
|
|
|
|
|
will have a reference count of 1. |
1628
|
|
|
|
|
|
|
|
1629
|
|
|
|
|
|
|
AV* av_make(I32 size, SV **strp)','name' => 'av_make'},'SvUV' => {'text' => 'Coerces the given SV to an unsigned integer and returns it. See C |
1630
|
|
|
|
|
|
|
for a version which guarantees to evaluate sv only once. |
1631
|
|
|
|
|
|
|
|
1632
|
|
|
|
|
|
|
UV SvUV(SV* sv)','name' => 'SvUV'},'hv_name_set' => {'text' => '','name' => 'hv_name_set'},'perl_run' => {'text' => 'Tells a Perl interpreter to run. See L. |
1633
|
|
|
|
|
|
|
|
1634
|
|
|
|
|
|
|
int perl_run(PerlInterpreter *my_perl)','name' => 'perl_run'},'mess_nocontext' => {'text' => '','name' => 'mess_nocontext'},'sv_insert_flags' => {'text' => 'Same as C, but the extra C are passed the C that applies to C. |
1635
|
|
|
|
|
|
|
|
1636
|
|
|
|
|
|
|
void sv_insert_flags(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen, const U32 flags)','name' => 'sv_insert_flags'},'SvPVutf8_nolen' => {'text' => 'Like C, but converts sv to utf8 first if necessary. |
1637
|
|
|
|
|
|
|
|
1638
|
|
|
|
|
|
|
char* SvPVutf8_nolen(SV* sv)','name' => 'SvPVutf8_nolen'},'SvRXOK' => {'text' => 'Returns a boolean indicating whether the SV contains qr magic |
1639
|
|
|
|
|
|
|
(PERL_MAGIC_qr). |
1640
|
|
|
|
|
|
|
|
1641
|
|
|
|
|
|
|
If you want to do something with the REGEXP* later use SvRX instead |
1642
|
|
|
|
|
|
|
and check for NULL. |
1643
|
|
|
|
|
|
|
|
1644
|
|
|
|
|
|
|
bool SvRXOK(SV* sv)','name' => 'SvRXOK'},'sv_setpviv' => {'text' => 'Copies an integer into the given SV, also updating its string value. |
1645
|
|
|
|
|
|
|
Does not handle \'set\' magic. See C. |
1646
|
|
|
|
|
|
|
|
1647
|
|
|
|
|
|
|
void sv_setpviv(SV *const sv, const IV num)','name' => 'sv_setpviv'},'sv_dup' => {'text' => '','name' => 'sv_dup'},'sv_true' => {'text' => 'Returns true if the SV has a true value by Perl\'s rules. |
1648
|
|
|
|
|
|
|
Use the C macro instead, which may call C or may |
1649
|
|
|
|
|
|
|
instead use an in-line version. |
1650
|
|
|
|
|
|
|
|
1651
|
|
|
|
|
|
|
I32 sv_true(SV *const sv)','name' => 'sv_true'},'save_aptr' => {'text' => '','name' => 'save_aptr'},'hv_exists' => {'text' => 'Returns a boolean indicating whether the specified hash key exists. The |
1652
|
|
|
|
|
|
|
C is the length of the key. |
1653
|
|
|
|
|
|
|
|
1654
|
|
|
|
|
|
|
bool hv_exists(HV *hv, const char *key, I32 klen)','name' => 'hv_exists'},'my_popen' => {'text' => '','name' => 'my_popen'},'mg_length' => {'text' => 'Report on the SV\'s length. See C. |
1655
|
|
|
|
|
|
|
|
1656
|
|
|
|
|
|
|
U32 mg_length(SV* sv)','name' => 'mg_length'},'vdeb' => {'text' => '','name' => 'vdeb'},'do_close' => {'text' => '','name' => 'do_close'},'newUNOP' => {'text' => '','name' => 'newUNOP'},'mini_mktime' => {'text' => '','name' => 'mini_mktime'},'HEf_SVKEY' => {'text' => 'This flag, used in the length slot of hash entries and magic structures, |
1657
|
|
|
|
|
|
|
specifies the structure contains an C pointer where a C pointer |
1658
|
|
|
|
|
|
|
is to be expected. (For information only--not to be used).','name' => 'HEf_SVKEY'},'save_helem_flags' => {'text' => '','name' => 'save_helem_flags'},'newPADOP' => {'text' => '','name' => 'newPADOP'},'utf8_length' => {'text' => 'Return the length of the UTF-8 char encoded string C in characters. |
1659
|
|
|
|
|
|
|
Stops at C (inclusive). If C s> or if the scan would end |
1660
|
|
|
|
|
|
|
up past C, croaks. |
1661
|
|
|
|
|
|
|
|
1662
|
|
|
|
|
|
|
STRLEN utf8_length(const U8* s, const U8 *e)','name' => 'utf8_length'},'is_uni_cntrl' => {'text' => '','name' => 'is_uni_cntrl'},'dowantarray' => {'text' => '','name' => 'dowantarray'},'my_cxt_init' => {'text' => '','name' => 'my_cxt_init'},'SvIOK_only_UV' => {'text' => 'Tells and SV that it is an unsigned integer and disables all other OK bits. |
1663
|
|
|
|
|
|
|
|
1664
|
|
|
|
|
|
|
void SvIOK_only_UV(SV* sv)','name' => 'SvIOK_only_UV'},'dump_fds' => {'text' => '','name' => 'dump_fds'},'sv_vcatpvfn' => {'text' => 'Processes its arguments like C and appends the formatted output |
1665
|
|
|
|
|
|
|
to an SV. Uses an array of SVs if the C style variable argument list is |
1666
|
|
|
|
|
|
|
missing (NULL). When running with taint checks enabled, indicates via |
1667
|
|
|
|
|
|
|
C if results are untrustworthy (often due to the use of |
1668
|
|
|
|
|
|
|
locales). |
1669
|
|
|
|
|
|
|
|
1670
|
|
|
|
|
|
|
Usually used via one of its frontends C and C. |
1671
|
|
|
|
|
|
|
|
1672
|
|
|
|
|
|
|
void sv_vcatpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted)','name' => 'sv_vcatpvfn'},'do_spawn' => {'text' => '','name' => 'do_spawn'},'share_hek' => {'text' => '','name' => 'share_hek'},'sv_pvutf8n' => {'text' => 'A private implementation of the C macro for compilers |
1673
|
|
|
|
|
|
|
which can\'t cope with complex macro expressions. Always use the macro |
1674
|
|
|
|
|
|
|
instead. |
1675
|
|
|
|
|
|
|
|
1676
|
|
|
|
|
|
|
char* sv_pvutf8n(SV *sv, STRLEN *lp)','name' => 'sv_pvutf8n'},'gv_fetchpv' => {'text' => '','name' => 'gv_fetchpv'},'newSV' => {'text' => 'Creates a new SV. A non-zero C parameter indicates the number of |
1677
|
|
|
|
|
|
|
bytes of preallocated string space the SV should have. An extra byte for a |
1678
|
|
|
|
|
|
|
trailing NUL is also reserved. (SvPOK is not set for the SV even if string |
1679
|
|
|
|
|
|
|
space is allocated.) The reference count for the new SV is set to 1. |
1680
|
|
|
|
|
|
|
|
1681
|
|
|
|
|
|
|
In 5.9.3, newSV() replaces the older NEWSV() API, and drops the first |
1682
|
|
|
|
|
|
|
parameter, I, a debug aid which allowed callers to identify themselves. |
1683
|
|
|
|
|
|
|
This aid has been superseded by a new build option, PERL_MEM_LOG (see |
1684
|
|
|
|
|
|
|
L). The older API is still there for use in XS |
1685
|
|
|
|
|
|
|
modules supporting older perls. |
1686
|
|
|
|
|
|
|
|
1687
|
|
|
|
|
|
|
SV* newSV(const STRLEN len)','name' => 'newSV'},'sv_2pvutf8' => {'text' => 'Return a pointer to the UTF-8-encoded representation of the SV, and set *lp |
1688
|
|
|
|
|
|
|
to its length. May cause the SV to be upgraded to UTF-8 as a side-effect. |
1689
|
|
|
|
|
|
|
|
1690
|
|
|
|
|
|
|
Usually accessed via the C macro. |
1691
|
|
|
|
|
|
|
|
1692
|
|
|
|
|
|
|
char* sv_2pvutf8(SV *const sv, STRLEN *const lp)','name' => 'sv_2pvutf8'},'dITEMS' => {'text' => 'Sets up the C variable. |
1693
|
|
|
|
|
|
|
This is usually handled automatically by C by calling C. |
1694
|
|
|
|
|
|
|
|
1695
|
|
|
|
|
|
|
dITEMS;','name' => 'dITEMS'},'save_scalar' => {'text' => '','name' => 'save_scalar'},'newSUB' => {'text' => '','name' => 'newSUB'},'despatch_signals' => {'text' => '','name' => 'despatch_signals'},'PUTBACK' => {'text' => 'Closing bracket for XSUB arguments. This is usually handled by C. |
1696
|
|
|
|
|
|
|
See C and L for other uses. |
1697
|
|
|
|
|
|
|
|
1698
|
|
|
|
|
|
|
PUTBACK;','name' => 'PUTBACK'},'dAXMARK' => {'text' => 'Sets up the C variable and stack marker variable C. |
1699
|
|
|
|
|
|
|
This is usually handled automatically by C by calling C. |
1700
|
|
|
|
|
|
|
|
1701
|
|
|
|
|
|
|
dAXMARK;','name' => 'dAXMARK'},'sv_2uv_flags' => {'text' => 'Return the unsigned integer value of an SV, doing any necessary string |
1702
|
|
|
|
|
|
|
conversion. If flags includes SV_GMAGIC, does an mg_get() first. |
1703
|
|
|
|
|
|
|
Normally used via the C and C macros. |
1704
|
|
|
|
|
|
|
|
1705
|
|
|
|
|
|
|
UV sv_2uv_flags(SV *const sv, const I32 flags)','name' => 'sv_2uv_flags'},'is_uni_punct' => {'text' => '','name' => 'is_uni_punct'},'G_SCALAR' => {'text' => 'Used to indicate scalar context. See C, C, and |
1706
|
|
|
|
|
|
|
L.','name' => 'G_SCALAR'},'SvTAINTED_off' => {'text' => 'Untaints an SV. Be I careful with this routine, as it short-circuits |
1707
|
|
|
|
|
|
|
some of Perl\'s fundamental security features. XS module authors should not |
1708
|
|
|
|
|
|
|
use this function unless they fully understand all the implications of |
1709
|
|
|
|
|
|
|
unconditionally untainting the value. Untainting should be done in the |
1710
|
|
|
|
|
|
|
standard perl fashion, via a carefully crafted regexp, rather than directly |
1711
|
|
|
|
|
|
|
untainting variables. |
1712
|
|
|
|
|
|
|
|
1713
|
|
|
|
|
|
|
void SvTAINTED_off(SV* sv)','name' => 'SvTAINTED_off'},'require_pv' => {'text' => 'Tells Perl to C the file named by the string argument. It is |
1714
|
|
|
|
|
|
|
analogous to the Perl code C. It\'s even |
1715
|
|
|
|
|
|
|
implemented that way; consider using load_module instead. |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1718
|
|
|
|
|
|
|
|
1719
|
|
|
|
|
|
|
void require_pv(const char* pv)','name' => 'require_pv'},'strEQ' => {'text' => 'Test two strings to see if they are equal. Returns true or false. |
1720
|
|
|
|
|
|
|
|
1721
|
|
|
|
|
|
|
bool strEQ(char* s1, char* s2)','name' => 'strEQ'},'sv_upgrade' => {'text' => 'Upgrade an SV to a more complex form. Generally adds a new body type to the |
1722
|
|
|
|
|
|
|
SV, then copies across as much information as possible from the old body. |
1723
|
|
|
|
|
|
|
You generally want to use the C macro wrapper. See also C. |
1724
|
|
|
|
|
|
|
|
1725
|
|
|
|
|
|
|
void sv_upgrade(SV *const sv, svtype new_type)','name' => 'sv_upgrade'},'save_hdelete' => {'text' => '','name' => 'save_hdelete'},'safesysmalloc' => {'text' => '','name' => 'safesysmalloc'},'isUPPER' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
1726
|
|
|
|
|
|
|
uppercase character. |
1727
|
|
|
|
|
|
|
|
1728
|
|
|
|
|
|
|
bool isUPPER(char ch)','name' => 'isUPPER'},'save_item' => {'text' => '','name' => 'save_item'},'lex_peek_unichar' => {'text' => 'Looks ahead one (Unicode) character in the text currently being lexed. |
1729
|
|
|
|
|
|
|
Returns the codepoint (unsigned integer value) of the next character, |
1730
|
|
|
|
|
|
|
or -1 if lexing has reached the end of the input text. To consume the |
1731
|
|
|
|
|
|
|
peeked character, use L. |
1732
|
|
|
|
|
|
|
|
1733
|
|
|
|
|
|
|
If the next character is in (or extends into) the next chunk of input |
1734
|
|
|
|
|
|
|
text, the next chunk will be read in. Normally the current chunk will be |
1735
|
|
|
|
|
|
|
discarded at the same time, but if I includes C |
1736
|
|
|
|
|
|
|
then the current chunk will not be discarded. |
1737
|
|
|
|
|
|
|
|
1738
|
|
|
|
|
|
|
If the input is being interpreted as UTF-8 and a UTF-8 encoding error |
1739
|
|
|
|
|
|
|
is encountered, an exception is generated. |
1740
|
|
|
|
|
|
|
|
1741
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1742
|
|
|
|
|
|
|
removed without notice. |
1743
|
|
|
|
|
|
|
|
1744
|
|
|
|
|
|
|
I32 lex_peek_unichar(U32 flags)','name' => 'lex_peek_unichar'},'sv_setsv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
1745
|
|
|
|
|
|
|
|
1746
|
|
|
|
|
|
|
void sv_setsv_mg(SV *const dstr, SV *const sstr)','name' => 'sv_setsv_mg'},'call_list' => {'text' => '','name' => 'call_list'},'croak_nocontext' => {'text' => '','name' => 'croak_nocontext'},'isLOWER' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
1747
|
|
|
|
|
|
|
lowercase character. |
1748
|
|
|
|
|
|
|
|
1749
|
|
|
|
|
|
|
bool isLOWER(char ch)','name' => 'isLOWER'},'hv_iterkey' => {'text' => 'Returns the key from the current position of the hash iterator. See |
1750
|
|
|
|
|
|
|
C. |
1751
|
|
|
|
|
|
|
|
1752
|
|
|
|
|
|
|
char* hv_iterkey(HE* entry, I32* retlen)','name' => 'hv_iterkey'},'SvNOKp' => {'text' => 'Returns a U32 value indicating whether the SV contains a double. Checks the |
1753
|
|
|
|
|
|
|
B setting. Use C instead. |
1754
|
|
|
|
|
|
|
|
1755
|
|
|
|
|
|
|
U32 SvNOKp(SV* sv)','name' => 'SvNOKp'},'nothreadhook' => {'text' => 'Stub that provides thread hook for perl_destruct when there are |
1756
|
|
|
|
|
|
|
no threads. |
1757
|
|
|
|
|
|
|
|
1758
|
|
|
|
|
|
|
int nothreadhook()','name' => 'nothreadhook'},'utf8_to_uvchr' => {'text' => 'Returns the native character value of the first character in the string C |
1759
|
|
|
|
|
|
|
which is assumed to be in UTF-8 encoding; C will be set to the |
1760
|
|
|
|
|
|
|
length, in bytes, of that character. |
1761
|
|
|
|
|
|
|
|
1762
|
|
|
|
|
|
|
If C does not point to a well-formed UTF-8 character, zero is |
1763
|
|
|
|
|
|
|
returned and retlen is set, if possible, to -1. |
1764
|
|
|
|
|
|
|
|
1765
|
|
|
|
|
|
|
UV utf8_to_uvchr(const U8 *s, STRLEN *retlen)','name' => 'utf8_to_uvchr'},'bytes_to_utf8' => {'text' => 'Converts a string C of length C from the native encoding into UTF-8. |
1766
|
|
|
|
|
|
|
Returns a pointer to the newly-created string, and sets C to |
1767
|
|
|
|
|
|
|
reflect the new length. |
1768
|
|
|
|
|
|
|
|
1769
|
|
|
|
|
|
|
A NUL character will be written after the end of the string. |
1770
|
|
|
|
|
|
|
|
1771
|
|
|
|
|
|
|
If you want to convert to UTF-8 from encodings other than |
1772
|
|
|
|
|
|
|
the native (Latin1 or EBCDIC), |
1773
|
|
|
|
|
|
|
see sv_recode_to_utf8(). |
1774
|
|
|
|
|
|
|
|
1775
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1776
|
|
|
|
|
|
|
removed without notice. |
1777
|
|
|
|
|
|
|
|
1778
|
|
|
|
|
|
|
U8* bytes_to_utf8(const U8 *s, STRLEN *len)','name' => 'bytes_to_utf8'},'SvIsCOW_shared_hash' => {'text' => 'Returns a boolean indicating whether the SV is Copy-On-Write shared hash key |
1779
|
|
|
|
|
|
|
scalar. |
1780
|
|
|
|
|
|
|
|
1781
|
|
|
|
|
|
|
bool SvIsCOW_shared_hash(SV* sv)','name' => 'SvIsCOW_shared_hash'},'start_subparse' => {'text' => '','name' => 'start_subparse'},'mg_size' => {'text' => '','name' => 'mg_size'},'to_uni_lower_lc' => {'text' => '','name' => 'to_uni_lower_lc'},'sv_catsv_nomg' => {'text' => 'Like C but doesn\'t process magic. |
1782
|
|
|
|
|
|
|
|
1783
|
|
|
|
|
|
|
void sv_catsv_nomg(SV* dsv, SV* ssv)','name' => 'sv_catsv_nomg'},'sv_setuv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
1784
|
|
|
|
|
|
|
|
1785
|
|
|
|
|
|
|
void sv_setuv_mg(SV *const sv, const UV u)','name' => 'sv_setuv_mg'},'XS_VERSION' => {'text' => 'The version identifier for an XS module. This is usually |
1786
|
|
|
|
|
|
|
handled automatically by C. See C.','name' => 'XS_VERSION'},'sys_intern_init' => {'text' => '','name' => 'sys_intern_init'},'fetch_cop_label' => {'text' => '','name' => 'fetch_cop_label'},'sv_setpv' => {'text' => 'Copies a string into an SV. The string must be null-terminated. Does not |
1787
|
|
|
|
|
|
|
handle \'set\' magic. See C. |
1788
|
|
|
|
|
|
|
|
1789
|
|
|
|
|
|
|
void sv_setpv(SV *const sv, const char *const ptr)','name' => 'sv_setpv'},'find_rundefsvoffset' => {'text' => '','name' => 'find_rundefsvoffset'},'hv_placeholders_set' => {'text' => '','name' => 'hv_placeholders_set'},'atfork_lock' => {'text' => '','name' => 'atfork_lock'},'gv_fetchmethod' => {'text' => 'See L. |
1790
|
|
|
|
|
|
|
|
1791
|
|
|
|
|
|
|
GV* gv_fetchmethod(HV* stash, const char* name)','name' => 'gv_fetchmethod'},'SvGROW' => {'text' => 'Expands the character buffer in the SV so that it has room for the |
1792
|
|
|
|
|
|
|
indicated number of bytes (remember to reserve space for an extra trailing |
1793
|
|
|
|
|
|
|
NUL character). Calls C to perform the expansion if necessary. |
1794
|
|
|
|
|
|
|
Returns a pointer to the character buffer. |
1795
|
|
|
|
|
|
|
|
1796
|
|
|
|
|
|
|
char * SvGROW(SV* sv, STRLEN len)','name' => 'SvGROW'},'dMULTICALL' => {'text' => 'Declare local variables for a multicall. See L. |
1797
|
|
|
|
|
|
|
|
1798
|
|
|
|
|
|
|
dMULTICALL;','name' => 'dMULTICALL'},'sv_catpv' => {'text' => 'Concatenates the string onto the end of the string which is in the SV. |
1799
|
|
|
|
|
|
|
If the SV has the UTF-8 status set, then the bytes appended should be |
1800
|
|
|
|
|
|
|
valid UTF-8. Handles \'get\' magic, but not \'set\' magic. See C. |
1801
|
|
|
|
|
|
|
|
1802
|
|
|
|
|
|
|
void sv_catpv(SV *const sv, const char* ptr)','name' => 'sv_catpv'},'fprintf_nocontext' => {'text' => '','name' => 'fprintf_nocontext'},'sv_len' => {'text' => 'Returns the length of the string in the SV. Handles magic and type |
1803
|
|
|
|
|
|
|
coercion. See also C, which gives raw access to the xpv_cur slot. |
1804
|
|
|
|
|
|
|
|
1805
|
|
|
|
|
|
|
STRLEN sv_len(SV *const sv)','name' => 'sv_len'},'PerlIO_stderr' => {'text' => '','name' => 'PerlIO_stderr'},'sv_pvutf8' => {'text' => 'Use the C macro instead |
1806
|
|
|
|
|
|
|
|
1807
|
|
|
|
|
|
|
char* sv_pvutf8(SV *sv)','name' => 'sv_pvutf8'},'SvPVbyte_nolen' => {'text' => 'Like C, but converts sv to byte representation first if necessary. |
1808
|
|
|
|
|
|
|
|
1809
|
|
|
|
|
|
|
char* SvPVbyte_nolen(SV* sv)','name' => 'SvPVbyte_nolen'},'LEAVE' => {'text' => 'Closing bracket on a callback. See C and L. |
1810
|
|
|
|
|
|
|
|
1811
|
|
|
|
|
|
|
LEAVE;','name' => 'LEAVE'},'SVt_PVAV' => {'text' => 'Type flag for arrays. See C.','name' => 'SVt_PVAV'},'mess' => {'text' => '','name' => 'mess'},'hv_delete_ent' => {'text' => 'Deletes a key/value pair in the hash. The value SV is removed from the |
1812
|
|
|
|
|
|
|
hash and returned to the caller. The C value will normally be zero; |
1813
|
|
|
|
|
|
|
if set to G_DISCARD then NULL will be returned. C can be a valid |
1814
|
|
|
|
|
|
|
precomputed hash value, or 0 to ask for it to be computed. |
1815
|
|
|
|
|
|
|
|
1816
|
|
|
|
|
|
|
SV* hv_delete_ent(HV *hv, SV *keysv, I32 flags, U32 hash)','name' => 'hv_delete_ent'},'PL_keyword_plugin' => {'text' => 'Function pointer, pointing at a function used to handle extended keywords. |
1817
|
|
|
|
|
|
|
The function should be declared as |
1818
|
|
|
|
|
|
|
|
1819
|
|
|
|
|
|
|
int keyword_plugin_function(pTHX_ |
1820
|
|
|
|
|
|
|
char *keyword_ptr, STRLEN keyword_len, |
1821
|
|
|
|
|
|
|
OP **op_ptr) |
1822
|
|
|
|
|
|
|
|
1823
|
|
|
|
|
|
|
The function is called from the tokeniser, whenever a possible keyword |
1824
|
|
|
|
|
|
|
is seen. C points at the word in the parser\'s input |
1825
|
|
|
|
|
|
|
buffer, and C gives its length; it is not null-terminated. |
1826
|
|
|
|
|
|
|
The function is expected to examine the word, and possibly other state |
1827
|
|
|
|
|
|
|
such as L<%^H|perlvar/%^H>, to decide whether it wants to handle it |
1828
|
|
|
|
|
|
|
as an extended keyword. If it does not, the function should return |
1829
|
|
|
|
|
|
|
C, and the normal parser process will continue. |
1830
|
|
|
|
|
|
|
|
1831
|
|
|
|
|
|
|
If the function wants to handle the keyword, it first must |
1832
|
|
|
|
|
|
|
parse anything following the keyword that is part of the syntax |
1833
|
|
|
|
|
|
|
introduced by the keyword. See L for details. |
1834
|
|
|
|
|
|
|
|
1835
|
|
|
|
|
|
|
When a keyword is being handled, the plugin function must build |
1836
|
|
|
|
|
|
|
a tree of C structures, representing the code that was parsed. |
1837
|
|
|
|
|
|
|
The root of the tree must be stored in C<*op_ptr>. The function then |
1838
|
|
|
|
|
|
|
returns a contant indicating the syntactic role of the construct that |
1839
|
|
|
|
|
|
|
it has parsed: C if it is a complete statement, or |
1840
|
|
|
|
|
|
|
C if it is an expression. Note that a statement |
1841
|
|
|
|
|
|
|
construct cannot be used inside an expression (except via C |
1842
|
|
|
|
|
|
|
and similar), and an expression is not a complete statement (it requires |
1843
|
|
|
|
|
|
|
at least a terminating semicolon). |
1844
|
|
|
|
|
|
|
|
1845
|
|
|
|
|
|
|
When a keyword is handled, the plugin function may also have |
1846
|
|
|
|
|
|
|
(compile-time) side effects. It may modify C<%^H>, define functions, and |
1847
|
|
|
|
|
|
|
so on. Typically, if side effects are the main purpose of a handler, |
1848
|
|
|
|
|
|
|
it does not wish to generate any ops to be included in the normal |
1849
|
|
|
|
|
|
|
compilation. In this case it is still required to supply an op tree, |
1850
|
|
|
|
|
|
|
but it suffices to generate a single null op. |
1851
|
|
|
|
|
|
|
|
1852
|
|
|
|
|
|
|
That\'s how the C<*PL_keyword_plugin> function needs to behave overall. |
1853
|
|
|
|
|
|
|
Conventionally, however, one does not completely replace the existing |
1854
|
|
|
|
|
|
|
handler function. Instead, take a copy of C before |
1855
|
|
|
|
|
|
|
assigning your own function pointer to it. Your handler function should |
1856
|
|
|
|
|
|
|
look for keywords that it is interested in and handle those. Where it |
1857
|
|
|
|
|
|
|
is not interested, it should call the saved plugin function, passing on |
1858
|
|
|
|
|
|
|
the arguments it received. Thus C actually points |
1859
|
|
|
|
|
|
|
at a chain of handler functions, all of which have an opportunity to |
1860
|
|
|
|
|
|
|
handle keywords, and only the last function in the chain (built into |
1861
|
|
|
|
|
|
|
the Perl core) will normally return C. |
1862
|
|
|
|
|
|
|
|
1863
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
1864
|
|
|
|
|
|
|
removed without notice.','name' => 'PL_keyword_plugin'},'cast_iv' => {'text' => '','name' => 'cast_iv'},'savesvpv' => {'text' => 'A version of C/C which gets the string to duplicate from |
1865
|
|
|
|
|
|
|
the passed in SV using C |
1866
|
|
|
|
|
|
|
|
1867
|
|
|
|
|
|
|
char* savesvpv(SV* sv)','name' => 'savesvpv'},'CLASS' => {'text' => 'Variable which is setup by C to indicate the |
1868
|
|
|
|
|
|
|
class name for a C++ XS constructor. This is always a C. See C. |
1869
|
|
|
|
|
|
|
|
1870
|
|
|
|
|
|
|
char* CLASS','name' => 'CLASS'},'newAVREF' => {'text' => '','name' => 'newAVREF'},'HeKLEN' => {'text' => 'If this is negative, and amounts to C, it indicates the entry |
1871
|
|
|
|
|
|
|
holds an C key. Otherwise, holds the actual length of the key. Can |
1872
|
|
|
|
|
|
|
be assigned to. The C macro is usually preferable for finding key |
1873
|
|
|
|
|
|
|
lengths. |
1874
|
|
|
|
|
|
|
|
1875
|
|
|
|
|
|
|
STRLEN HeKLEN(HE* he)','name' => 'HeKLEN'},'sv_pvn_force_flags' => {'text' => 'Get a sensible string out of the SV somehow. |
1876
|
|
|
|
|
|
|
If C has C bit set, will C on C if |
1877
|
|
|
|
|
|
|
appropriate, else not. C and C are |
1878
|
|
|
|
|
|
|
implemented in terms of this function. |
1879
|
|
|
|
|
|
|
You normally want to use the various wrapper macros instead: see |
1880
|
|
|
|
|
|
|
C and C |
1881
|
|
|
|
|
|
|
|
1882
|
|
|
|
|
|
|
char* sv_pvn_force_flags(SV *const sv, STRLEN *const lp, const I32 flags)','name' => 'sv_pvn_force_flags'},'sv_setpvf_mg_nocontext' => {'text' => '','name' => 'sv_setpvf_mg_nocontext'},'mPUSHi' => {'text' => 'Push an integer onto the stack. The stack must have room for this element. |
1883
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
1884
|
|
|
|
|
|
|
|
1885
|
|
|
|
|
|
|
void mPUSHi(IV iv)','name' => 'mPUSHi'},'PUSHn' => {'text' => 'Push a double onto the stack. The stack must have room for this element. |
1886
|
|
|
|
|
|
|
Handles \'set\' magic. Uses C, so C or C should be |
1887
|
|
|
|
|
|
|
called to declare it. Do not call multiple C-oriented macros to |
1888
|
|
|
|
|
|
|
return lists from XSUB\'s - see C instead. See also C and |
1889
|
|
|
|
|
|
|
C. |
1890
|
|
|
|
|
|
|
|
1891
|
|
|
|
|
|
|
void PUSHn(NV nv)','name' => 'PUSHn'},'to_utf8_title' => {'text' => 'Convert the UTF-8 encoded character at p to its titlecase version and |
1892
|
|
|
|
|
|
|
store that in UTF-8 in ustrp and its length in bytes in lenp. Note |
1893
|
|
|
|
|
|
|
that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the |
1894
|
|
|
|
|
|
|
titlecase version may be longer than the original character. |
1895
|
|
|
|
|
|
|
|
1896
|
|
|
|
|
|
|
The first character of the titlecased version is returned |
1897
|
|
|
|
|
|
|
(but note, as explained above, that there may be more.) |
1898
|
|
|
|
|
|
|
|
1899
|
|
|
|
|
|
|
UV to_utf8_title(const U8 *p, U8* ustrp, STRLEN *lenp)','name' => 'to_utf8_title'},'PerlIO_unread' => {'text' => '','name' => 'PerlIO_unread'},'gv_fullname' => {'text' => '','name' => 'gv_fullname'},'PL_sv_yes' => {'text' => 'This is the C SV. See C. Always refer to this as |
1900
|
|
|
|
|
|
|
C<&PL_sv_yes>. |
1901
|
|
|
|
|
|
|
|
1902
|
|
|
|
|
|
|
SV PL_sv_yes','name' => 'PL_sv_yes'},'pregfree' => {'text' => '','name' => 'pregfree'},'sv_nosharing' => {'text' => 'Dummy routine which "shares" an SV when there is no sharing module present. |
1903
|
|
|
|
|
|
|
Or "locks" it. Or "unlocks" it. In other words, ignores its single SV argument. |
1904
|
|
|
|
|
|
|
Exists to avoid test for a NULL function pointer and because it could |
1905
|
|
|
|
|
|
|
potentially warn under some level of strict-ness. |
1906
|
|
|
|
|
|
|
|
1907
|
|
|
|
|
|
|
void sv_nosharing(SV *sv)','name' => 'sv_nosharing'},'ck_warner' => {'text' => '','name' => 'ck_warner'},'is_ascii_string' => {'text' => 'Returns true if first C bytes of the given string are ASCII (i.e. none |
1908
|
|
|
|
|
|
|
of them even raise the question of UTF-8-ness). |
1909
|
|
|
|
|
|
|
|
1910
|
|
|
|
|
|
|
See also is_utf8_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). |
1911
|
|
|
|
|
|
|
|
1912
|
|
|
|
|
|
|
bool is_ascii_string(const U8 *s, STRLEN len)','name' => 'is_ascii_string'},'SvUTF8_off' => {'text' => 'Unsets the UTF-8 status of an SV. |
1913
|
|
|
|
|
|
|
|
1914
|
|
|
|
|
|
|
void SvUTF8_off(SV *sv)','name' => 'SvUTF8_off'},'looks_like_number' => {'text' => 'Test if the content of an SV looks like a number (or is a number). |
1915
|
|
|
|
|
|
|
C and C are treated as numbers (so will not issue a |
1916
|
|
|
|
|
|
|
non-numeric warning), even if your atof() doesn\'t grok them. |
1917
|
|
|
|
|
|
|
|
1918
|
|
|
|
|
|
|
I32 looks_like_number(SV *const sv)','name' => 'looks_like_number'},'sv_catpv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
1919
|
|
|
|
|
|
|
|
1920
|
|
|
|
|
|
|
void sv_catpv_mg(SV *const sv, const char *const ptr)','name' => 'sv_catpv_mg'},'XSRETURN_EMPTY' => {'text' => 'Return an empty list from an XSUB immediately. |
1921
|
|
|
|
|
|
|
|
1922
|
|
|
|
|
|
|
XSRETURN_EMPTY;','name' => 'XSRETURN_EMPTY'},'save_vptr' => {'text' => '','name' => 'save_vptr'},'mro_get_private_data' => {'text' => '','name' => 'mro_get_private_data'},'hv_delayfree_ent' => {'text' => '','name' => 'hv_delayfree_ent'},'sv_setpvf' => {'text' => 'Works like C but copies the text into the SV instead of |
1923
|
|
|
|
|
|
|
appending it. Does not handle \'set\' magic. See C. |
1924
|
|
|
|
|
|
|
|
1925
|
|
|
|
|
|
|
void sv_setpvf(SV *const sv, const char *const pat, ...)','name' => 'sv_setpvf'},'save_int' => {'text' => '','name' => 'save_int'},'scan_num' => {'text' => '','name' => 'scan_num'},'call_sv' => {'text' => 'Performs a callback to the Perl sub whose name is in the SV. See |
1926
|
|
|
|
|
|
|
L. |
1927
|
|
|
|
|
|
|
|
1928
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1929
|
|
|
|
|
|
|
|
1930
|
|
|
|
|
|
|
I32 call_sv(SV* sv, VOL I32 flags)','name' => 'call_sv'},'SVt_PV' => {'text' => 'Pointer type flag for scalars. See C.','name' => 'SVt_PV'},'strGT' => {'text' => 'Test two strings to see if the first, C, is greater than the second, |
1931
|
|
|
|
|
|
|
C. Returns true or false. |
1932
|
|
|
|
|
|
|
|
1933
|
|
|
|
|
|
|
bool strGT(char* s1, char* s2)','name' => 'strGT'},'is_uni_alnum' => {'text' => '','name' => 'is_uni_alnum'},'mXPUSHs' => {'text' => 'Push an SV onto the stack, extending the stack if necessary and mortalizes |
1934
|
|
|
|
|
|
|
the SV. Does not use C. See also C and C. |
1935
|
|
|
|
|
|
|
|
1936
|
|
|
|
|
|
|
void mXPUSHs(SV* sv)','name' => 'mXPUSHs'},'POPl' => {'text' => 'Pops a long off the stack. |
1937
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
long POPl','name' => 'POPl'},'init_i18nl14n' => {'text' => '','name' => 'init_i18nl14n'},'scan_version' => {'text' => 'Returns a pointer to the next character after the parsed |
1939
|
|
|
|
|
|
|
version string, as well as upgrading the passed in SV to |
1940
|
|
|
|
|
|
|
an RV. |
1941
|
|
|
|
|
|
|
|
1942
|
|
|
|
|
|
|
Function must be called with an already existing SV like |
1943
|
|
|
|
|
|
|
|
1944
|
|
|
|
|
|
|
sv = newSV(0); |
1945
|
|
|
|
|
|
|
s = scan_version(s, SV *sv, bool qv); |
1946
|
|
|
|
|
|
|
|
1947
|
|
|
|
|
|
|
Performs some preprocessing to the string to ensure that |
1948
|
|
|
|
|
|
|
it has the correct characteristics of a version. Flags the |
1949
|
|
|
|
|
|
|
object if it contains an underscore (which denotes this |
1950
|
|
|
|
|
|
|
is an alpha version). The boolean qv denotes that the version |
1951
|
|
|
|
|
|
|
should be interpreted as if it had multiple decimals, even if |
1952
|
|
|
|
|
|
|
it doesn\'t. |
1953
|
|
|
|
|
|
|
|
1954
|
|
|
|
|
|
|
const char* scan_version(const char *s, SV *rv, bool qv)','name' => 'scan_version'},'hv_common_key_len' => {'text' => '','name' => 'hv_common_key_len'},'vnumify' => {'text' => 'Accepts a version object and returns the normalized floating |
1955
|
|
|
|
|
|
|
point representation. Call like: |
1956
|
|
|
|
|
|
|
|
1957
|
|
|
|
|
|
|
sv = vnumify(rv); |
1958
|
|
|
|
|
|
|
|
1959
|
|
|
|
|
|
|
NOTE: you can pass either the object directly or the SV |
1960
|
|
|
|
|
|
|
contained within the RV. |
1961
|
|
|
|
|
|
|
|
1962
|
|
|
|
|
|
|
SV* vnumify(SV *vs)','name' => 'vnumify'},'get_cv' => {'text' => 'Uses C to get the length of C, then calls C. |
1963
|
|
|
|
|
|
|
|
1964
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
1965
|
|
|
|
|
|
|
|
1966
|
|
|
|
|
|
|
CV* get_cv(const char* name, I32 flags)','name' => 'get_cv'},'SvIOKp' => {'text' => 'Returns a U32 value indicating whether the SV contains an integer. Checks |
1967
|
|
|
|
|
|
|
the B setting. Use C instead. |
1968
|
|
|
|
|
|
|
|
1969
|
|
|
|
|
|
|
U32 SvIOKp(SV* sv)','name' => 'SvIOKp'},'XST_mUNDEF' => {'text' => 'Place C<&PL_sv_undef> into the specified position C on the |
1970
|
|
|
|
|
|
|
stack. |
1971
|
|
|
|
|
|
|
|
1972
|
|
|
|
|
|
|
void XST_mUNDEF(int pos)','name' => 'XST_mUNDEF'},'ptr_table_free' => {'text' => '','name' => 'ptr_table_free'},'SvUNLOCK' => {'text' => 'Releases a mutual exclusion lock on sv if a suitable module |
1973
|
|
|
|
|
|
|
has been loaded. |
1974
|
|
|
|
|
|
|
|
1975
|
|
|
|
|
|
|
void SvUNLOCK(SV* sv)','name' => 'SvUNLOCK'},'mg_set' => {'text' => 'Do magic after a value is assigned to the SV. See C. |
1976
|
|
|
|
|
|
|
|
1977
|
|
|
|
|
|
|
int mg_set(SV* sv)','name' => 'mg_set'},'sv_mortalcopy' => {'text' => 'Creates a new SV which is a copy of the original SV (using C). |
1978
|
|
|
|
|
|
|
The new SV is marked as mortal. It will be destroyed "soon", either by an |
1979
|
|
|
|
|
|
|
explicit call to FREETMPS, or by an implicit call at places such as |
1980
|
|
|
|
|
|
|
statement boundaries. See also C and C. |
1981
|
|
|
|
|
|
|
|
1982
|
|
|
|
|
|
|
SV* sv_mortalcopy(SV *const oldsv)','name' => 'sv_mortalcopy'},'is_utf8_space' => {'text' => '','name' => 'is_utf8_space'},'sv_catpvn_nomg' => {'text' => 'Like C but doesn\'t process magic. |
1983
|
|
|
|
|
|
|
|
1984
|
|
|
|
|
|
|
void sv_catpvn_nomg(SV* sv, const char* ptr, STRLEN len)','name' => 'sv_catpvn_nomg'},'newSVpvs_flags' => {'text' => 'Like C, but takes a literal string instead of a string/length |
1985
|
|
|
|
|
|
|
pair. |
1986
|
|
|
|
|
|
|
|
1987
|
|
|
|
|
|
|
SV* newSVpvs_flags(const char* s, U32 flags)','name' => 'newSVpvs_flags'},'newHVhv' => {'text' => '','name' => 'newHVhv'},'savepvn' => {'text' => 'Perl\'s version of what C would be if it existed. Returns a |
1988
|
|
|
|
|
|
|
pointer to a newly allocated string which is a duplicate of the first |
1989
|
|
|
|
|
|
|
C bytes from C, plus a trailing NUL byte. The memory allocated for |
1990
|
|
|
|
|
|
|
the new string can be freed with the C function. |
1991
|
|
|
|
|
|
|
|
1992
|
|
|
|
|
|
|
char* savepvn(const char* pv, I32 len)','name' => 'savepvn'},'av_exists' => {'text' => 'Returns true if the element indexed by C has been initialized. |
1993
|
|
|
|
|
|
|
|
1994
|
|
|
|
|
|
|
This relies on the fact that uninitialized array elements are set to |
1995
|
|
|
|
|
|
|
C<&PL_sv_undef>. |
1996
|
|
|
|
|
|
|
|
1997
|
|
|
|
|
|
|
bool av_exists(AV *av, I32 key)','name' => 'av_exists'},'SvCUR' => {'text' => 'Returns the length of the string which is in the SV. See C. |
1998
|
|
|
|
|
|
|
|
1999
|
|
|
|
|
|
|
STRLEN SvCUR(SV* sv)','name' => 'SvCUR'},'gv_fetchmethod_flags' => {'text' => '','name' => 'gv_fetchmethod_flags'},'gv_init' => {'text' => '','name' => 'gv_init'},'sv_bless' => {'text' => 'Blesses an SV into a specified package. The SV must be an RV. The package |
2000
|
|
|
|
|
|
|
must be designated by its stash (see C). The reference count |
2001
|
|
|
|
|
|
|
of the SV is unaffected. |
2002
|
|
|
|
|
|
|
|
2003
|
|
|
|
|
|
|
SV* sv_bless(SV *const sv, HV *const stash)','name' => 'sv_bless'},'sv_2io' => {'text' => 'Using various gambits, try to get an IO from an SV: the IO slot if its a |
2004
|
|
|
|
|
|
|
GV; or the recursive result if we\'re an RV; or the IO slot of the symbol |
2005
|
|
|
|
|
|
|
named after the PV if we\'re a string. |
2006
|
|
|
|
|
|
|
|
2007
|
|
|
|
|
|
|
IO* sv_2io(SV *const sv)','name' => 'sv_2io'},'save_ary' => {'text' => '','name' => 'save_ary'},'newXS_flags' => {'text' => '','name' => 'newXS_flags'},'SvMAGIC_set' => {'text' => 'Set the value of the MAGIC pointer in sv to val. See C. |
2008
|
|
|
|
|
|
|
|
2009
|
|
|
|
|
|
|
void SvMAGIC_set(SV* sv, MAGIC* val)','name' => 'SvMAGIC_set'},'isALPHA' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
2010
|
|
|
|
|
|
|
alphabetic character. |
2011
|
|
|
|
|
|
|
|
2012
|
|
|
|
|
|
|
bool isALPHA(char ch)','name' => 'isALPHA'},'newSVhek' => {'text' => 'Creates a new SV from the hash key structure. It will generate scalars that |
2013
|
|
|
|
|
|
|
point to the shared string table where possible. Returns a new (undefined) |
2014
|
|
|
|
|
|
|
SV if the hek is NULL. |
2015
|
|
|
|
|
|
|
|
2016
|
|
|
|
|
|
|
SV* newSVhek(const HEK *const hek)','name' => 'newSVhek'},'taint_env' => {'text' => '','name' => 'taint_env'},'Nullhv' => {'text' => 'Null HV pointer. |
2017
|
|
|
|
|
|
|
|
2018
|
|
|
|
|
|
|
(deprecated - use C<(HV *)NULL> instead)','name' => 'Nullhv'},'SvREFCNT_inc' => {'text' => 'Increments the reference count of the given SV. |
2019
|
|
|
|
|
|
|
|
2020
|
|
|
|
|
|
|
All of the following SvREFCNT_inc* macros are optimized versions of |
2021
|
|
|
|
|
|
|
SvREFCNT_inc, and can be replaced with SvREFCNT_inc. |
2022
|
|
|
|
|
|
|
|
2023
|
|
|
|
|
|
|
SV* SvREFCNT_inc(SV* sv)','name' => 'SvREFCNT_inc'},'SvTYPE' => {'text' => 'Returns the type of the SV. See C. |
2024
|
|
|
|
|
|
|
|
2025
|
|
|
|
|
|
|
svtype SvTYPE(SV* sv)','name' => 'SvTYPE'},'block_gimme' => {'text' => '','name' => 'block_gimme'},'SvROK_off' => {'text' => 'Unsets the RV status of an SV. |
2026
|
|
|
|
|
|
|
|
2027
|
|
|
|
|
|
|
void SvROK_off(SV* sv)','name' => 'SvROK_off'},'Renew' => {'text' => 'The XSUB-writer\'s interface to the C C function. |
2028
|
|
|
|
|
|
|
|
2029
|
|
|
|
|
|
|
void Renew(void* ptr, int nitems, type)','name' => 'Renew'},'XPUSHmortal' => {'text' => 'Push a new mortal SV onto the stack, extending the stack if necessary. |
2030
|
|
|
|
|
|
|
Does not use C. See also C, C and C. |
2031
|
|
|
|
|
|
|
|
2032
|
|
|
|
|
|
|
void XPUSHmortal()','name' => 'XPUSHmortal'},'SvNOK_on' => {'text' => 'Tells an SV that it is a double. |
2033
|
|
|
|
|
|
|
|
2034
|
|
|
|
|
|
|
void SvNOK_on(SV* sv)','name' => 'SvNOK_on'},'SvVOK' => {'text' => 'Returns a boolean indicating whether the SV contains a v-string. |
2035
|
|
|
|
|
|
|
|
2036
|
|
|
|
|
|
|
bool SvVOK(SV* sv)','name' => 'SvVOK'},'sv_setpvf_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
2037
|
|
|
|
|
|
|
|
2038
|
|
|
|
|
|
|
void sv_setpvf_mg(SV *const sv, const char *const pat, ...)','name' => 'sv_setpvf_mg'},'my_chsize' => {'text' => '','name' => 'my_chsize'},'newLISTOP' => {'text' => '','name' => 'newLISTOP'},'sv_setref_pv' => {'text' => 'Copies a pointer into a new SV, optionally blessing the SV. The C |
2039
|
|
|
|
|
|
|
argument will be upgraded to an RV. That RV will be modified to point to |
2040
|
|
|
|
|
|
|
the new SV. If the C argument is NULL then C will be placed |
2041
|
|
|
|
|
|
|
into the SV. The C argument indicates the package for the |
2042
|
|
|
|
|
|
|
blessing. Set C to C to avoid the blessing. The new SV |
2043
|
|
|
|
|
|
|
will have a reference count of 1, and the RV will be returned. |
2044
|
|
|
|
|
|
|
|
2045
|
|
|
|
|
|
|
Do not use with other Perl types such as HV, AV, SV, CV, because those |
2046
|
|
|
|
|
|
|
objects will become corrupted by the pointer copy process. |
2047
|
|
|
|
|
|
|
|
2048
|
|
|
|
|
|
|
Note that C copies the string while this copies the pointer. |
2049
|
|
|
|
|
|
|
|
2050
|
|
|
|
|
|
|
SV* sv_setref_pv(SV *const rv, const char *const classname, void *const pv)','name' => 'sv_setref_pv'},'fbm_compile' => {'text' => 'Analyses the string in order to make fast searches on it using fbm_instr() |
2051
|
|
|
|
|
|
|
-- the Boyer-Moore algorithm. |
2052
|
|
|
|
|
|
|
|
2053
|
|
|
|
|
|
|
void fbm_compile(SV* sv, U32 flags)','name' => 'fbm_compile'},'SvNIOKp' => {'text' => 'Returns a U32 value indicating whether the SV contains a number, integer or |
2054
|
|
|
|
|
|
|
double. Checks the B setting. Use C instead. |
2055
|
|
|
|
|
|
|
|
2056
|
|
|
|
|
|
|
U32 SvNIOKp(SV* sv)','name' => 'SvNIOKp'},'PERL_SYS_TERM' => {'text' => 'Provides system-specific clean up of the C runtime environment after |
2057
|
|
|
|
|
|
|
running Perl interpreters. This should be called only once, after |
2058
|
|
|
|
|
|
|
freeing any remaining Perl interpreters. |
2059
|
|
|
|
|
|
|
|
2060
|
|
|
|
|
|
|
void PERL_SYS_TERM()','name' => 'PERL_SYS_TERM'},'is_uni_alnum_lc' => {'text' => '','name' => 'is_uni_alnum_lc'},'mro_register' => {'text' => '','name' => 'mro_register'},'vnewSVpvf' => {'text' => '','name' => 'vnewSVpvf'},'sv_len_utf8' => {'text' => 'Returns the number of characters in the string in an SV, counting wide |
2061
|
|
|
|
|
|
|
UTF-8 bytes as a single character. Handles magic and type coercion. |
2062
|
|
|
|
|
|
|
|
2063
|
|
|
|
|
|
|
STRLEN sv_len_utf8(SV *const sv)','name' => 'sv_len_utf8'},'PerlIO_set_cnt' => {'text' => '','name' => 'PerlIO_set_cnt'},'SvREFCNT_inc_simple_void' => {'text' => 'Same as SvREFCNT_inc_simple, but can only be used if you don\'t need the |
2064
|
|
|
|
|
|
|
return value. The macro doesn\'t need to return a meaningful value. |
2065
|
|
|
|
|
|
|
|
2066
|
|
|
|
|
|
|
void SvREFCNT_inc_simple_void(SV* sv)','name' => 'SvREFCNT_inc_simple_void'},'cx_dup' => {'text' => '','name' => 'cx_dup'},'hv_clear_placeholders' => {'text' => 'Clears any placeholders from a hash. If a restricted hash has any of its keys |
2067
|
|
|
|
|
|
|
marked as readonly and the key is subsequently deleted, the key is not actually |
2068
|
|
|
|
|
|
|
deleted but is marked by assigning it a value of &PL_sv_placeholder. This tags |
2069
|
|
|
|
|
|
|
it so it will be ignored by future operations such as iterating over the hash, |
2070
|
|
|
|
|
|
|
but will still allow the hash to have a value reassigned to the key at some |
2071
|
|
|
|
|
|
|
future point. This function clears any such placeholder keys from the hash. |
2072
|
|
|
|
|
|
|
See Hash::Util::lock_keys() for an example of its use. |
2073
|
|
|
|
|
|
|
|
2074
|
|
|
|
|
|
|
void hv_clear_placeholders(HV *hv)','name' => 'hv_clear_placeholders'},'dAX' => {'text' => 'Sets up the C variable. |
2075
|
|
|
|
|
|
|
This is usually handled automatically by C by calling C. |
2076
|
|
|
|
|
|
|
|
2077
|
|
|
|
|
|
|
dAX;','name' => 'dAX'},'SvRV_set' => {'text' => 'Set the value of the RV pointer in sv to val. See C. |
2078
|
|
|
|
|
|
|
|
2079
|
|
|
|
|
|
|
void SvRV_set(SV* sv, SV* val)','name' => 'SvRV_set'},'grok_number' => {'text' => 'Recognise (or not) a number. The type of the number is returned |
2080
|
|
|
|
|
|
|
(0 if unrecognised), otherwise it is a bit-ORed combination of |
2081
|
|
|
|
|
|
|
IS_NUMBER_IN_UV, IS_NUMBER_GREATER_THAN_UV_MAX, IS_NUMBER_NOT_INT, |
2082
|
|
|
|
|
|
|
IS_NUMBER_NEG, IS_NUMBER_INFINITY, IS_NUMBER_NAN (defined in perl.h). |
2083
|
|
|
|
|
|
|
|
2084
|
|
|
|
|
|
|
If the value of the number can fit an in UV, it is returned in the *valuep |
2085
|
|
|
|
|
|
|
IS_NUMBER_IN_UV will be set to indicate that *valuep is valid, IS_NUMBER_IN_UV |
2086
|
|
|
|
|
|
|
will never be set unless *valuep is valid, but *valuep may have been assigned |
2087
|
|
|
|
|
|
|
to during processing even though IS_NUMBER_IN_UV is not set on return. |
2088
|
|
|
|
|
|
|
If valuep is NULL, IS_NUMBER_IN_UV will be set for the same cases as when |
2089
|
|
|
|
|
|
|
valuep is non-NULL, but no actual assignment (or SEGV) will occur. |
2090
|
|
|
|
|
|
|
|
2091
|
|
|
|
|
|
|
IS_NUMBER_NOT_INT will be set with IS_NUMBER_IN_UV if trailing decimals were |
2092
|
|
|
|
|
|
|
seen (in which case *valuep gives the true value truncated to an integer), and |
2093
|
|
|
|
|
|
|
IS_NUMBER_NEG if the number is negative (in which case *valuep holds the |
2094
|
|
|
|
|
|
|
absolute value). IS_NUMBER_IN_UV is not set if e notation was used or the |
2095
|
|
|
|
|
|
|
number is larger than a UV. |
2096
|
|
|
|
|
|
|
|
2097
|
|
|
|
|
|
|
int grok_number(const char *pv, STRLEN len, UV *valuep)','name' => 'grok_number'},'csighandler' => {'text' => '','name' => 'csighandler'},'SvIVx' => {'text' => 'Coerces the given SV to an integer and returns it. Guarantees to evaluate |
2098
|
|
|
|
|
|
|
C only once. Only use this if C is an expression with side effects, |
2099
|
|
|
|
|
|
|
otherwise use the more efficient C. |
2100
|
|
|
|
|
|
|
|
2101
|
|
|
|
|
|
|
IV SvIVx(SV* sv)','name' => 'SvIVx'},'grok_numeric_radix' => {'text' => 'Scan and skip for a numeric decimal separator (radix). |
2102
|
|
|
|
|
|
|
|
2103
|
|
|
|
|
|
|
bool grok_numeric_radix(const char **sp, const char *send)','name' => 'grok_numeric_radix'},'XST_mNO' => {'text' => 'Place C<&PL_sv_no> into the specified position C on the |
2104
|
|
|
|
|
|
|
stack. |
2105
|
|
|
|
|
|
|
|
2106
|
|
|
|
|
|
|
void XST_mNO(int pos)','name' => 'XST_mNO'},'gp_dup' => {'text' => '','name' => 'gp_dup'},'savepvs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
2107
|
|
|
|
|
|
|
|
2108
|
|
|
|
|
|
|
char* savepvs(const char* s)','name' => 'savepvs'},'SvSTASH_set' => {'text' => 'Set the value of the STASH pointer in sv to val. See C. |
2109
|
|
|
|
|
|
|
|
2110
|
|
|
|
|
|
|
void SvSTASH_set(SV* sv, HV* val)','name' => 'SvSTASH_set'},'ZeroD' => {'text' => 'Like C but returns dest. Useful for encouraging compilers to tail-call |
2111
|
|
|
|
|
|
|
optimise. |
2112
|
|
|
|
|
|
|
|
2113
|
|
|
|
|
|
|
void * ZeroD(void* dest, int nitems, type)','name' => 'ZeroD'},'sv_collxfrm' => {'text' => 'Add Collate Transform magic to an SV if it doesn\'t already have it. |
2114
|
|
|
|
|
|
|
|
2115
|
|
|
|
|
|
|
Any scalar variable may carry PERL_MAGIC_collxfrm magic that contains the |
2116
|
|
|
|
|
|
|
scalar data of the variable, but transformed to such a format that a normal |
2117
|
|
|
|
|
|
|
memory comparison can be used to compare the data according to the locale |
2118
|
|
|
|
|
|
|
settings. |
2119
|
|
|
|
|
|
|
|
2120
|
|
|
|
|
|
|
char* sv_collxfrm(SV *const sv, STRLEN *const nxp)','name' => 'sv_collxfrm'},'SP' => {'text' => 'Stack pointer. This is usually handled by C. See C and |
2121
|
|
|
|
|
|
|
C.','name' => 'SP'},'swash_fetch' => {'text' => '','name' => 'swash_fetch'},'sv_catpvn_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
2122
|
|
|
|
|
|
|
|
2123
|
|
|
|
|
|
|
void sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len)','name' => 'sv_catpvn_mg'},'dirp_dup' => {'text' => '','name' => 'dirp_dup'},'is_uni_upper' => {'text' => '','name' => 'is_uni_upper'},'vcmp' => {'text' => 'Version object aware cmp. Both operands must already have been |
2124
|
|
|
|
|
|
|
converted into version objects. |
2125
|
|
|
|
|
|
|
|
2126
|
|
|
|
|
|
|
int vcmp(SV *lhv, SV *rhv)','name' => 'vcmp'},'Zero' => {'text' => 'The XSUB-writer\'s interface to the C C function. The C is the |
2127
|
|
|
|
|
|
|
destination, C is the number of items, and C is the type. |
2128
|
|
|
|
|
|
|
|
2129
|
|
|
|
|
|
|
void Zero(void* dest, int nitems, type)','name' => 'Zero'},'gv_stashpvs' => {'text' => 'Like C, but takes a literal string instead of a string/length pair. |
2130
|
|
|
|
|
|
|
|
2131
|
|
|
|
|
|
|
HV* gv_stashpvs(const char* name, I32 create)','name' => 'gv_stashpvs'},'SvSTASH' => {'text' => 'Returns the stash of the SV. |
2132
|
|
|
|
|
|
|
|
2133
|
|
|
|
|
|
|
HV* SvSTASH(SV* sv)','name' => 'SvSTASH'},'XSRETURN_UNDEF' => {'text' => 'Return C<&PL_sv_undef> from an XSUB immediately. Uses C. |
2134
|
|
|
|
|
|
|
|
2135
|
|
|
|
|
|
|
XSRETURN_UNDEF;','name' => 'XSRETURN_UNDEF'},'sv_iv' => {'text' => 'A private implementation of the C macro for compilers which can\'t |
2136
|
|
|
|
|
|
|
cope with complex macro expressions. Always use the macro instead. |
2137
|
|
|
|
|
|
|
|
2138
|
|
|
|
|
|
|
IV sv_iv(SV* sv)','name' => 'sv_iv'},'PL_parser-Ebufend' => {'text' => 'Direct pointer to the end of the chunk of text currently being lexed, the |
2139
|
|
|
|
|
|
|
end of the lexer buffer. This is equal to Clinestr) |
2140
|
|
|
|
|
|
|
+ SvCUR(PL_parser-Elinestr)>. A NUL character (zero octet) is |
2141
|
|
|
|
|
|
|
always located at the end of the buffer, and does not count as part of |
2142
|
|
|
|
|
|
|
the buffer\'s contents. |
2143
|
|
|
|
|
|
|
|
2144
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2145
|
|
|
|
|
|
|
removed without notice.','name' => 'PL_parser-Ebufend'},'PerlIO_error' => {'text' => '','name' => 'PerlIO_error'},'is_utf8_graph' => {'text' => '','name' => 'is_utf8_graph'},'pv_escape' => {'text' => 'Escapes at most the first "count" chars of pv and puts the results into |
2146
|
|
|
|
|
|
|
dsv such that the size of the escaped string will not exceed "max" chars |
2147
|
|
|
|
|
|
|
and will not contain any incomplete escape sequences. |
2148
|
|
|
|
|
|
|
|
2149
|
|
|
|
|
|
|
If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the string |
2150
|
|
|
|
|
|
|
will also be escaped. |
2151
|
|
|
|
|
|
|
|
2152
|
|
|
|
|
|
|
Normally the SV will be cleared before the escaped string is prepared, |
2153
|
|
|
|
|
|
|
but when PERL_PV_ESCAPE_NOCLEAR is set this will not occur. |
2154
|
|
|
|
|
|
|
|
2155
|
|
|
|
|
|
|
If PERL_PV_ESCAPE_UNI is set then the input string is treated as Unicode, |
2156
|
|
|
|
|
|
|
if PERL_PV_ESCAPE_UNI_DETECT is set then the input string is scanned |
2157
|
|
|
|
|
|
|
using C to determine if it is Unicode. |
2158
|
|
|
|
|
|
|
|
2159
|
|
|
|
|
|
|
If PERL_PV_ESCAPE_ALL is set then all input chars will be output |
2160
|
|
|
|
|
|
|
using C<\\x01F1> style escapes, otherwise only chars above 255 will be |
2161
|
|
|
|
|
|
|
escaped using this style, other non printable chars will use octal or |
2162
|
|
|
|
|
|
|
common escaped patterns like C<\\n>. If PERL_PV_ESCAPE_NOBACKSLASH |
2163
|
|
|
|
|
|
|
then all chars below 255 will be treated as printable and |
2164
|
|
|
|
|
|
|
will be output as literals. |
2165
|
|
|
|
|
|
|
|
2166
|
|
|
|
|
|
|
If PERL_PV_ESCAPE_FIRSTCHAR is set then only the first char of the |
2167
|
|
|
|
|
|
|
string will be escaped, regardles of max. If the string is utf8 and |
2168
|
|
|
|
|
|
|
the chars value is >255 then it will be returned as a plain hex |
2169
|
|
|
|
|
|
|
sequence. Thus the output will either be a single char, |
2170
|
|
|
|
|
|
|
an octal escape sequence, a special escape like C<\\n> or a 3 or |
2171
|
|
|
|
|
|
|
more digit hex value. |
2172
|
|
|
|
|
|
|
|
2173
|
|
|
|
|
|
|
If PERL_PV_ESCAPE_RE is set then the escape char used will be a \'%\' and |
2174
|
|
|
|
|
|
|
not a \'\\\\\'. This is because regexes very often contain backslashed |
2175
|
|
|
|
|
|
|
sequences, whereas \'%\' is not a particularly common character in patterns. |
2176
|
|
|
|
|
|
|
|
2177
|
|
|
|
|
|
|
Returns a pointer to the escaped text as held by dsv. |
2178
|
|
|
|
|
|
|
|
2179
|
|
|
|
|
|
|
char* pv_escape(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags)','name' => 'pv_escape'},'HeSVKEY_force' => {'text' => 'Returns the key as an C. Will create and return a temporary mortal |
2180
|
|
|
|
|
|
|
C if the hash entry contains only a C key. |
2181
|
|
|
|
|
|
|
|
2182
|
|
|
|
|
|
|
SV* HeSVKEY_force(HE* he)','name' => 'HeSVKEY_force'},'my_exit' => {'text' => '','name' => 'my_exit'},'newRV_inc' => {'text' => 'Creates an RV wrapper for an SV. The reference count for the original SV is |
2183
|
|
|
|
|
|
|
incremented. |
2184
|
|
|
|
|
|
|
|
2185
|
|
|
|
|
|
|
SV* newRV_inc(SV* sv)','name' => 'newRV_inc'},'SVt_PVCV' => {'text' => 'Type flag for code refs. See C.','name' => 'SVt_PVCV'},'ss_dup' => {'text' => '','name' => 'ss_dup'},'gv_handler' => {'text' => '','name' => 'gv_handler'},'sv_setpviv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
2186
|
|
|
|
|
|
|
|
2187
|
|
|
|
|
|
|
void sv_setpviv_mg(SV *const sv, const IV iv)','name' => 'sv_setpviv_mg'},'debstack' => {'text' => '','name' => 'debstack'},'sv_2bool' => {'text' => 'This function is only called on magical items, and is only used by |
2188
|
|
|
|
|
|
|
sv_true() or its macro equivalent. |
2189
|
|
|
|
|
|
|
|
2190
|
|
|
|
|
|
|
bool sv_2bool(SV *const sv)','name' => 'sv_2bool'},'lex_grow_linestr' => {'text' => 'Reallocates the lexer buffer (Llinestr>) to accommodate |
2191
|
|
|
|
|
|
|
at least I octets (including terminating NUL). Returns a |
2192
|
|
|
|
|
|
|
pointer to the reallocated buffer. This is necessary before making |
2193
|
|
|
|
|
|
|
any direct modification of the buffer that would increase its length. |
2194
|
|
|
|
|
|
|
L provides a more convenient way to insert text into |
2195
|
|
|
|
|
|
|
the buffer. |
2196
|
|
|
|
|
|
|
|
2197
|
|
|
|
|
|
|
Do not use C or C directly on Clinestr>; |
2198
|
|
|
|
|
|
|
this function updates all of the lexer\'s variables that point directly |
2199
|
|
|
|
|
|
|
into the buffer. |
2200
|
|
|
|
|
|
|
|
2201
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2202
|
|
|
|
|
|
|
removed without notice. |
2203
|
|
|
|
|
|
|
|
2204
|
|
|
|
|
|
|
char * lex_grow_linestr(STRLEN len)','name' => 'lex_grow_linestr'},'dORIGMARK' => {'text' => 'Saves the original stack mark for the XSUB. See C. |
2205
|
|
|
|
|
|
|
|
2206
|
|
|
|
|
|
|
dORIGMARK;','name' => 'dORIGMARK'},'sv_newmortal' => {'text' => 'Creates a new null SV which is mortal. The reference count of the SV is |
2207
|
|
|
|
|
|
|
set to 1. It will be destroyed "soon", either by an explicit call to |
2208
|
|
|
|
|
|
|
FREETMPS, or by an implicit call at places such as statement boundaries. |
2209
|
|
|
|
|
|
|
See also C and C. |
2210
|
|
|
|
|
|
|
|
2211
|
|
|
|
|
|
|
SV* sv_newmortal()','name' => 'sv_newmortal'},'is_utf8_cntrl' => {'text' => '','name' => 'is_utf8_cntrl'},'SvPV_set' => {'text' => 'Set the value of the PV pointer in sv to val. See C. |
2212
|
|
|
|
|
|
|
|
2213
|
|
|
|
|
|
|
void SvPV_set(SV* sv, char* val)','name' => 'SvPV_set'},'SvOOK' => {'text' => 'Returns a U32 indicating whether the pointer to the string buffer is offset. |
2214
|
|
|
|
|
|
|
This hack is used internally to speed up removal of characters from the |
2215
|
|
|
|
|
|
|
beginning of a SvPV. When SvOOK is true, then the start of the |
2216
|
|
|
|
|
|
|
allocated string buffer is actually C bytes before SvPVX. |
2217
|
|
|
|
|
|
|
This offset used to be stored in SvIVX, but is now stored within the spare |
2218
|
|
|
|
|
|
|
part of the buffer. |
2219
|
|
|
|
|
|
|
|
2220
|
|
|
|
|
|
|
U32 SvOOK(SV* sv)','name' => 'SvOOK'},'hv_clear' => {'text' => 'Clears a hash, making it empty. |
2221
|
|
|
|
|
|
|
|
2222
|
|
|
|
|
|
|
void hv_clear(HV *hv)','name' => 'hv_clear'},'get_hv' => {'text' => 'Returns the HV of the specified Perl hash. C are passed to |
2223
|
|
|
|
|
|
|
C. If C is set and the |
2224
|
|
|
|
|
|
|
Perl variable does not exist then it will be created. If C is zero |
2225
|
|
|
|
|
|
|
and the variable does not exist then NULL is returned. |
2226
|
|
|
|
|
|
|
|
2227
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
2228
|
|
|
|
|
|
|
|
2229
|
|
|
|
|
|
|
HV* get_hv(const char *name, I32 flags)','name' => 'get_hv'},'XSRETURN_YES' => {'text' => 'Return C<&PL_sv_yes> from an XSUB immediately. Uses C. |
2230
|
|
|
|
|
|
|
|
2231
|
|
|
|
|
|
|
XSRETURN_YES;','name' => 'XSRETURN_YES'},'PoisonNew' => {'text' => 'PoisonWith(0xAB) for catching access to allocated but uninitialized memory. |
2232
|
|
|
|
|
|
|
|
2233
|
|
|
|
|
|
|
void PoisonNew(void* dest, int nitems, type)','name' => 'PoisonNew'},'safesysrealloc' => {'text' => '','name' => 'safesysrealloc'},'Renewc' => {'text' => 'The XSUB-writer\'s interface to the C C function, with |
2234
|
|
|
|
|
|
|
cast. |
2235
|
|
|
|
|
|
|
|
2236
|
|
|
|
|
|
|
void Renewc(void* ptr, int nitems, type, cast)','name' => 'Renewc'},'sv_nv' => {'text' => 'A private implementation of the C macro for compilers which can\'t |
2237
|
|
|
|
|
|
|
cope with complex macro expressions. Always use the macro instead. |
2238
|
|
|
|
|
|
|
|
2239
|
|
|
|
|
|
|
NV sv_nv(SV* sv)','name' => 'sv_nv'},'SvPOK_off' => {'text' => 'Unsets the PV status of an SV. |
2240
|
|
|
|
|
|
|
|
2241
|
|
|
|
|
|
|
void SvPOK_off(SV* sv)','name' => 'SvPOK_off'},'PUSHu' => {'text' => 'Push an unsigned integer onto the stack. The stack must have room for this |
2242
|
|
|
|
|
|
|
element. Handles \'set\' magic. Uses C, so C or C |
2243
|
|
|
|
|
|
|
should be called to declare it. Do not call multiple C-oriented |
2244
|
|
|
|
|
|
|
macros to return lists from XSUB\'s - see C instead. See also |
2245
|
|
|
|
|
|
|
C and C. |
2246
|
|
|
|
|
|
|
|
2247
|
|
|
|
|
|
|
void PUSHu(UV uv)','name' => 'PUSHu'},'newSVsv' => {'text' => 'Creates a new SV which is an exact duplicate of the original SV. |
2248
|
|
|
|
|
|
|
(Uses C). |
2249
|
|
|
|
|
|
|
|
2250
|
|
|
|
|
|
|
SV* newSVsv(SV *const old)','name' => 'newSVsv'},'hv_magic' => {'text' => 'Adds magic to a hash. See C. |
2251
|
|
|
|
|
|
|
|
2252
|
|
|
|
|
|
|
void hv_magic(HV *hv, GV *gv, int how)','name' => 'hv_magic'},'deb_nocontext' => {'text' => '','name' => 'deb_nocontext'},'new_stackinfo' => {'text' => '','name' => 'new_stackinfo'},'save_aelem' => {'text' => '','name' => 'save_aelem'},'PerlIO_clearerr' => {'text' => '','name' => 'PerlIO_clearerr'},'cx_dump' => {'text' => '','name' => 'cx_dump'},'hv_placeholders_p' => {'text' => '','name' => 'hv_placeholders_p'},'XCPT_TRY_END' => {'text' => 'Ends a try block. See L.','name' => 'XCPT_TRY_END'},'HeKEY' => {'text' => 'Returns the actual pointer stored in the key slot of the hash entry. The |
2253
|
|
|
|
|
|
|
pointer may be either C or C, depending on the value of |
2254
|
|
|
|
|
|
|
C. Can be assigned to. The C or C macros are |
2255
|
|
|
|
|
|
|
usually preferable for finding the value of a key. |
2256
|
|
|
|
|
|
|
|
2257
|
|
|
|
|
|
|
void* HeKEY(HE* he)','name' => 'HeKEY'},'SvEND' => {'text' => 'Returns a pointer to the last character in the string which is in the SV. |
2258
|
|
|
|
|
|
|
See C. Access the character as *(SvEND(sv)). |
2259
|
|
|
|
|
|
|
|
2260
|
|
|
|
|
|
|
char* SvEND(SV* sv)','name' => 'SvEND'},'GIMME_V' => {'text' => 'The XSUB-writer\'s equivalent to Perl\'s C. Returns C, |
2261
|
|
|
|
|
|
|
C or C for void, scalar or list context, |
2262
|
|
|
|
|
|
|
respectively. |
2263
|
|
|
|
|
|
|
|
2264
|
|
|
|
|
|
|
U32 GIMME_V','name' => 'GIMME_V'},'save_delete' => {'text' => '','name' => 'save_delete'},'re_compile' => {'text' => '','name' => 're_compile'},'sv_setsv_flags' => {'text' => 'Copies the contents of the source SV C into the destination SV |
2265
|
|
|
|
|
|
|
C. The source SV may be destroyed if it is mortal, so don\'t use this |
2266
|
|
|
|
|
|
|
function if the source SV needs to be reused. Does not handle \'set\' magic. |
2267
|
|
|
|
|
|
|
Loosely speaking, it performs a copy-by-value, obliterating any previous |
2268
|
|
|
|
|
|
|
content of the destination. |
2269
|
|
|
|
|
|
|
If the C parameter has the C bit set, will C on |
2270
|
|
|
|
|
|
|
C if appropriate, else not. If the C parameter has the |
2271
|
|
|
|
|
|
|
C bit set then the buffers of temps will not be stolen. |
2272
|
|
|
|
|
|
|
and C are implemented in terms of this function. |
2273
|
|
|
|
|
|
|
|
2274
|
|
|
|
|
|
|
You probably want to use one of the assortment of wrappers, such as |
2275
|
|
|
|
|
|
|
C, C, C and |
2276
|
|
|
|
|
|
|
C. |
2277
|
|
|
|
|
|
|
|
2278
|
|
|
|
|
|
|
This is the primary function for copying scalars, and most other |
2279
|
|
|
|
|
|
|
copy-ish functions and macros use this underneath. |
2280
|
|
|
|
|
|
|
|
2281
|
|
|
|
|
|
|
void sv_setsv_flags(SV *dstr, SV *sstr, const I32 flags)','name' => 'sv_setsv_flags'},'newATTRSUB' => {'text' => '','name' => 'newATTRSUB'},'Copy' => {'text' => 'The XSUB-writer\'s interface to the C C function. The C is the |
2282
|
|
|
|
|
|
|
source, C is the destination, C is the number of items, and C is |
2283
|
|
|
|
|
|
|
the type. May fail on overlapping copies. See also C. |
2284
|
|
|
|
|
|
|
|
2285
|
|
|
|
|
|
|
void Copy(void* src, void* dest, int nitems, type)','name' => 'Copy'},'sv_taint' => {'text' => 'Taint an SV. Use C instead. |
2286
|
|
|
|
|
|
|
void sv_taint(SV* sv)','name' => 'sv_taint'},'utf16_to_utf8' => {'text' => '','name' => 'utf16_to_utf8'},'SvIOK_notUV' => {'text' => 'Returns a boolean indicating whether the SV contains a signed integer. |
2287
|
|
|
|
|
|
|
|
2288
|
|
|
|
|
|
|
bool SvIOK_notUV(SV* sv)','name' => 'SvIOK_notUV'},'deb' => {'text' => '','name' => 'deb'},'PL_parser-Elinestart' => {'text' => 'Points to the start of the current line inside the lexer buffer. |
2289
|
|
|
|
|
|
|
This is useful for indicating at which column an error occurred, and |
2290
|
|
|
|
|
|
|
not much else. This must be updated by any lexing code that consumes |
2291
|
|
|
|
|
|
|
a newline; the function L handles this detail. |
2292
|
|
|
|
|
|
|
|
2293
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2294
|
|
|
|
|
|
|
removed without notice.','name' => 'PL_parser-Elinestart'},'he_dup' => {'text' => '','name' => 'he_dup'},'gv_fullname3' => {'text' => '','name' => 'gv_fullname3'},'mPUSHu' => {'text' => 'Push an unsigned integer onto the stack. The stack must have room for this |
2295
|
|
|
|
|
|
|
element. Does not use C. See also C, C and C. |
2296
|
|
|
|
|
|
|
|
2297
|
|
|
|
|
|
|
void mPUSHu(UV uv)','name' => 'mPUSHu'},'repeatcpy' => {'text' => '','name' => 'repeatcpy'},'do_spawn_nowait' => {'text' => '','name' => 'do_spawn_nowait'},'sv_setsv_nomg' => {'text' => 'Like C but doesn\'t process magic. |
2298
|
|
|
|
|
|
|
|
2299
|
|
|
|
|
|
|
void sv_setsv_nomg(SV* dsv, SV* ssv)','name' => 'sv_setsv_nomg'},'load_module_nocontext' => {'text' => '','name' => 'load_module_nocontext'},'do_magic_dump' => {'text' => '','name' => 'do_magic_dump'},'re_intuit_string' => {'text' => '','name' => 're_intuit_string'},'XPUSHp' => {'text' => 'Push a string onto the stack, extending the stack if necessary. The C |
2300
|
|
|
|
|
|
|
indicates the length of the string. Handles \'set\' magic. Uses C, so |
2301
|
|
|
|
|
|
|
C or C should be called to declare it. Do not call |
2302
|
|
|
|
|
|
|
multiple C-oriented macros to return lists from XSUB\'s - see |
2303
|
|
|
|
|
|
|
C instead. See also C and C. |
2304
|
|
|
|
|
|
|
|
2305
|
|
|
|
|
|
|
void XPUSHp(char* str, STRLEN len)','name' => 'XPUSHp'},'av_create_and_push' => {'text' => 'Push an SV onto the end of the array, creating the array if necessary. |
2306
|
|
|
|
|
|
|
A small internal helper function to remove a commonly duplicated idiom. |
2307
|
|
|
|
|
|
|
|
2308
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2309
|
|
|
|
|
|
|
removed without notice. |
2310
|
|
|
|
|
|
|
|
2311
|
|
|
|
|
|
|
void av_create_and_push(AV **const avp, SV *const val)','name' => 'av_create_and_push'},'sv_utf8_encode' => {'text' => 'Converts the PV of an SV to UTF-8, but then turns the C |
2312
|
|
|
|
|
|
|
flag off so that it looks like octets again. |
2313
|
|
|
|
|
|
|
|
2314
|
|
|
|
|
|
|
void sv_utf8_encode(SV *const sv)','name' => 'sv_utf8_encode'},'SvUTF8_on' => {'text' => 'Turn on the UTF-8 status of an SV (the data is not changed, just the flag). |
2315
|
|
|
|
|
|
|
Do not use frivolously. |
2316
|
|
|
|
|
|
|
|
2317
|
|
|
|
|
|
|
void SvUTF8_on(SV *sv)','name' => 'SvUTF8_on'},'sv_setpvn_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
2318
|
|
|
|
|
|
|
|
2319
|
|
|
|
|
|
|
void sv_setpvn_mg(SV *const sv, const char *const ptr, const STRLEN len)','name' => 'sv_setpvn_mg'},'toLOWER' => {'text' => 'Converts the specified character to lowercase. Characters outside the |
2320
|
|
|
|
|
|
|
US-ASCII (Basic Latin) range are viewed as not having any case. |
2321
|
|
|
|
|
|
|
|
2322
|
|
|
|
|
|
|
char toLOWER(char ch)','name' => 'toLOWER'},'av_iter_p' => {'text' => '','name' => 'av_iter_p'},'prescan_version' => {'text' => 'const char* prescan_version(const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha)','name' => 'prescan_version'},'PerlIO_write' => {'text' => '','name' => 'PerlIO_write'},'hv_ksplit' => {'text' => '','name' => 'hv_ksplit'},'new_version' => {'text' => 'Returns a new version object based on the passed in SV: |
2323
|
|
|
|
|
|
|
|
2324
|
|
|
|
|
|
|
SV *sv = new_version(SV *ver); |
2325
|
|
|
|
|
|
|
|
2326
|
|
|
|
|
|
|
Does not alter the passed in ver SV. See "upg_version" if you |
2327
|
|
|
|
|
|
|
want to upgrade the SV. |
2328
|
|
|
|
|
|
|
|
2329
|
|
|
|
|
|
|
SV* new_version(SV *ver)','name' => 'new_version'},'PerlIO_seek' => {'text' => '','name' => 'PerlIO_seek'},'free_tmps' => {'text' => '','name' => 'free_tmps'},'Nullav' => {'text' => 'Null AV pointer. |
2330
|
|
|
|
|
|
|
|
2331
|
|
|
|
|
|
|
(deprecated - use C<(AV *)NULL> instead)','name' => 'Nullav'},'sv_pvbyten' => {'text' => 'A private implementation of the C macro for compilers |
2332
|
|
|
|
|
|
|
which can\'t cope with complex macro expressions. Always use the macro |
2333
|
|
|
|
|
|
|
instead. |
2334
|
|
|
|
|
|
|
|
2335
|
|
|
|
|
|
|
char* sv_pvbyten(SV *sv, STRLEN *lp)','name' => 'sv_pvbyten'},'sv_copypv' => {'text' => 'Copies a stringified representation of the source SV into the |
2336
|
|
|
|
|
|
|
destination SV. Automatically performs any necessary mg_get and |
2337
|
|
|
|
|
|
|
coercion of numeric values into strings. Guaranteed to preserve |
2338
|
|
|
|
|
|
|
UTF8 flag even from overloaded objects. Similar in nature to |
2339
|
|
|
|
|
|
|
sv_2pv[_flags] but operates directly on an SV instead of just the |
2340
|
|
|
|
|
|
|
string. Mostly uses sv_2pv_flags to do its work, except when that |
2341
|
|
|
|
|
|
|
would lose the UTF-8\'ness of the PV. |
2342
|
|
|
|
|
|
|
|
2343
|
|
|
|
|
|
|
void sv_copypv(SV *const dsv, SV *const ssv)','name' => 'sv_copypv'},'sv_pv' => {'text' => 'Use the C macro instead |
2344
|
|
|
|
|
|
|
|
2345
|
|
|
|
|
|
|
char* sv_pv(SV *sv)','name' => 'sv_pv'},'rsignal' => {'text' => '','name' => 'rsignal'},'is_uni_xdigit' => {'text' => '','name' => 'is_uni_xdigit'},'sv_setnv_mg' => {'text' => 'Like C, but also handles \'set\' magic. |
2346
|
|
|
|
|
|
|
|
2347
|
|
|
|
|
|
|
void sv_setnv_mg(SV *const sv, const NV num)','name' => 'sv_setnv_mg'},'pv_pretty' => {'text' => 'Converts a string into something presentable, handling escaping via |
2348
|
|
|
|
|
|
|
pv_escape() and supporting quoting and ellipses. |
2349
|
|
|
|
|
|
|
|
2350
|
|
|
|
|
|
|
If the PERL_PV_PRETTY_QUOTE flag is set then the result will be |
2351
|
|
|
|
|
|
|
double quoted with any double quotes in the string escaped. Otherwise |
2352
|
|
|
|
|
|
|
if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in |
2353
|
|
|
|
|
|
|
angle brackets. |
2354
|
|
|
|
|
|
|
|
2355
|
|
|
|
|
|
|
If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in |
2356
|
|
|
|
|
|
|
string were output then an ellipsis C<...> will be appended to the |
2357
|
|
|
|
|
|
|
string. Note that this happens AFTER it has been quoted. |
2358
|
|
|
|
|
|
|
|
2359
|
|
|
|
|
|
|
If start_color is non-null then it will be inserted after the opening |
2360
|
|
|
|
|
|
|
quote (if there is one) but before the escaped text. If end_color |
2361
|
|
|
|
|
|
|
is non-null then it will be inserted after the escaped text but before |
2362
|
|
|
|
|
|
|
any quotes or ellipses. |
2363
|
|
|
|
|
|
|
|
2364
|
|
|
|
|
|
|
Returns a pointer to the prettified text as held by dsv. |
2365
|
|
|
|
|
|
|
|
2366
|
|
|
|
|
|
|
char* pv_pretty(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags)','name' => 'pv_pretty'},'perl_alloc_using' => {'text' => '','name' => 'perl_alloc_using'},'utf8_to_bytes' => {'text' => 'Converts a string C of length C from UTF-8 into native byte encoding. |
2367
|
|
|
|
|
|
|
Unlike C, this over-writes the original string, and |
2368
|
|
|
|
|
|
|
updates len to contain the new length. |
2369
|
|
|
|
|
|
|
Returns zero on failure, setting C to -1. |
2370
|
|
|
|
|
|
|
|
2371
|
|
|
|
|
|
|
If you need a copy of the string, see C. |
2372
|
|
|
|
|
|
|
|
2373
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2374
|
|
|
|
|
|
|
removed without notice. |
2375
|
|
|
|
|
|
|
|
2376
|
|
|
|
|
|
|
U8* utf8_to_bytes(U8 *s, STRLEN *len)','name' => 'utf8_to_bytes'},'re_dup_guts' => {'text' => '','name' => 're_dup_guts'},'si_dup' => {'text' => '','name' => 'si_dup'},'uvuni_to_utf8_flags' => {'text' => 'Adds the UTF-8 representation of the Unicode codepoint C to the end |
2377
|
|
|
|
|
|
|
of the string C; C should be have at least C free |
2378
|
|
|
|
|
|
|
bytes available. The return value is the pointer to the byte after the |
2379
|
|
|
|
|
|
|
end of the new character. In other words, |
2380
|
|
|
|
|
|
|
|
2381
|
|
|
|
|
|
|
d = uvuni_to_utf8_flags(d, uv, flags); |
2382
|
|
|
|
|
|
|
|
2383
|
|
|
|
|
|
|
or, in most cases, |
2384
|
|
|
|
|
|
|
|
2385
|
|
|
|
|
|
|
d = uvuni_to_utf8(d, uv); |
2386
|
|
|
|
|
|
|
|
2387
|
|
|
|
|
|
|
(which is equivalent to) |
2388
|
|
|
|
|
|
|
|
2389
|
|
|
|
|
|
|
d = uvuni_to_utf8_flags(d, uv, 0); |
2390
|
|
|
|
|
|
|
|
2391
|
|
|
|
|
|
|
is the recommended Unicode-aware way of saying |
2392
|
|
|
|
|
|
|
|
2393
|
|
|
|
|
|
|
*(d++) = uv; |
2394
|
|
|
|
|
|
|
|
2395
|
|
|
|
|
|
|
U8* uvuni_to_utf8_flags(U8 *d, UV uv, UV flags)','name' => 'uvuni_to_utf8_flags'},'G_DISCARD' => {'text' => 'Indicates that arguments returned from a callback should be discarded. See |
2396
|
|
|
|
|
|
|
L.','name' => 'G_DISCARD'},'newGVREF' => {'text' => '','name' => 'newGVREF'},'XST_mNV' => {'text' => 'Place a double into the specified position C on the stack. The value |
2397
|
|
|
|
|
|
|
is stored in a new mortal SV. |
2398
|
|
|
|
|
|
|
|
2399
|
|
|
|
|
|
|
void XST_mNV(int pos, NV nv)','name' => 'XST_mNV'},'UNDERBAR' => {'text' => 'The SV* corresponding to the $_ variable. Works even if there |
2400
|
|
|
|
|
|
|
is a lexical $_ in scope.','name' => 'UNDERBAR'},'newSVOP' => {'text' => '','name' => 'newSVOP'},'pad_sv' => {'text' => 'Get the value at offset po in the current pad. |
2401
|
|
|
|
|
|
|
Use macro PAD_SV instead of calling this function directly. |
2402
|
|
|
|
|
|
|
|
2403
|
|
|
|
|
|
|
SV* pad_sv(PADOFFSET po)','name' => 'pad_sv'},'amagic_call' => {'text' => '','name' => 'amagic_call'},'op_free' => {'text' => '','name' => 'op_free'},'SvPVutf8_force' => {'text' => 'Like C, but converts sv to utf8 first if necessary. |
2404
|
|
|
|
|
|
|
|
2405
|
|
|
|
|
|
|
char* SvPVutf8_force(SV* sv, STRLEN len)','name' => 'SvPVutf8_force'},'gv_AVadd' => {'text' => '','name' => 'gv_AVadd'},'pop_scope' => {'text' => '','name' => 'pop_scope'},'SVt_NV' => {'text' => 'Double type flag for scalars. See C.','name' => 'SVt_NV'},'my_popen_list' => {'text' => '','name' => 'my_popen_list'},'PUSHMARK' => {'text' => 'Opening bracket for arguments on a callback. See C and |
2406
|
|
|
|
|
|
|
L. |
2407
|
|
|
|
|
|
|
|
2408
|
|
|
|
|
|
|
void PUSHMARK(SP)','name' => 'PUSHMARK'},'sv_2uv' => {'text' => '','name' => 'sv_2uv'},'taint_proper' => {'text' => '','name' => 'taint_proper'},'save_generic_pvref' => {'text' => '','name' => 'save_generic_pvref'},'ST' => {'text' => 'Used to access elements on the XSUB\'s stack. |
2409
|
|
|
|
|
|
|
|
2410
|
|
|
|
|
|
|
SV* ST(int ix)','name' => 'ST'},'call_pv' => {'text' => 'Performs a callback to the specified Perl sub. See L. |
2411
|
|
|
|
|
|
|
|
2412
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
2413
|
|
|
|
|
|
|
|
2414
|
|
|
|
|
|
|
I32 call_pv(const char* sub_name, I32 flags)','name' => 'call_pv'},'gv_fetchmeth_autoload' => {'text' => 'Same as gv_fetchmeth(), but looks for autoloaded subroutines too. |
2415
|
|
|
|
|
|
|
Returns a glob for the subroutine. |
2416
|
|
|
|
|
|
|
|
2417
|
|
|
|
|
|
|
For an autoloaded subroutine without a GV, will create a GV even |
2418
|
|
|
|
|
|
|
if C. For an autoloaded subroutine without a stub, GvCV() |
2419
|
|
|
|
|
|
|
of the result may be zero. |
2420
|
|
|
|
|
|
|
|
2421
|
|
|
|
|
|
|
GV* gv_fetchmeth_autoload(HV* stash, const char* name, STRLEN len, I32 level)','name' => 'gv_fetchmeth_autoload'},'save_mortalizesv' => {'text' => '','name' => 'save_mortalizesv'},'sv_pos_b2u' => {'text' => 'Converts the value pointed to by offsetp from a count of bytes from the |
2422
|
|
|
|
|
|
|
start of the string, to a count of the equivalent number of UTF-8 chars. |
2423
|
|
|
|
|
|
|
Handles magic and type coercion. |
2424
|
|
|
|
|
|
|
|
2425
|
|
|
|
|
|
|
void sv_pos_b2u(SV *const sv, I32 *const offsetp)','name' => 'sv_pos_b2u'},'sv_utf8_upgrade_flags_grow' => {'text' => '','name' => 'sv_utf8_upgrade_flags_grow'},'SVt_IV' => {'text' => 'Integer type flag for scalars. See C.','name' => 'SVt_IV'},'SvIsCOW' => {'text' => 'Returns a boolean indicating whether the SV is Copy-On-Write. (either shared |
2426
|
|
|
|
|
|
|
hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for |
2427
|
|
|
|
|
|
|
COW) |
2428
|
|
|
|
|
|
|
|
2429
|
|
|
|
|
|
|
bool SvIsCOW(SV* sv)','name' => 'SvIsCOW'},'reentrant_size' => {'text' => '','name' => 'reentrant_size'},'apply_attrs_string' => {'text' => '','name' => 'apply_attrs_string'},'printf_nocontext' => {'text' => '','name' => 'printf_nocontext'},'save_freesv' => {'text' => '','name' => 'save_freesv'},'sv_catsv' => {'text' => 'Concatenates the string from SV C onto the end of the string in |
2430
|
|
|
|
|
|
|
SV C. Modifies C but not C. Handles \'get\' magic, but |
2431
|
|
|
|
|
|
|
not \'set\' magic. See C. |
2432
|
|
|
|
|
|
|
|
2433
|
|
|
|
|
|
|
void sv_catsv(SV *dstr, SV *sstr)','name' => 'sv_catsv'},'SvPOK_on' => {'text' => 'Tells an SV that it is a string. |
2434
|
|
|
|
|
|
|
|
2435
|
|
|
|
|
|
|
void SvPOK_on(SV* sv)','name' => 'SvPOK_on'},'ax' => {'text' => 'Variable which is setup by C to indicate the stack base offset, |
2436
|
|
|
|
|
|
|
used by the C, C and C macros. The C macro |
2437
|
|
|
|
|
|
|
must be called prior to setup the C variable. |
2438
|
|
|
|
|
|
|
|
2439
|
|
|
|
|
|
|
I32 ax','name' => 'ax'},'regexec_flags' => {'text' => '','name' => 'regexec_flags'},'to_utf8_upper' => {'text' => 'Convert the UTF-8 encoded character at p to its uppercase version and |
2440
|
|
|
|
|
|
|
store that in UTF-8 in ustrp and its length in bytes in lenp. Note |
2441
|
|
|
|
|
|
|
that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since |
2442
|
|
|
|
|
|
|
the uppercase version may be longer than the original character. |
2443
|
|
|
|
|
|
|
|
2444
|
|
|
|
|
|
|
The first character of the uppercased version is returned |
2445
|
|
|
|
|
|
|
(but note, as explained above, that there may be more.) |
2446
|
|
|
|
|
|
|
|
2447
|
|
|
|
|
|
|
UV to_utf8_upper(const U8 *p, U8* ustrp, STRLEN *lenp)','name' => 'to_utf8_upper'},'SvPVutf8x_force' => {'text' => 'Like C, but converts sv to utf8 first if necessary. |
2448
|
|
|
|
|
|
|
Guarantees to evaluate sv only once; use the more efficient C |
2449
|
|
|
|
|
|
|
otherwise. |
2450
|
|
|
|
|
|
|
|
2451
|
|
|
|
|
|
|
char* SvPVutf8x_force(SV* sv, STRLEN len)','name' => 'SvPVutf8x_force'},'warner_nocontext' => {'text' => '','name' => 'warner_nocontext'},'my_htonl' => {'text' => '','name' => 'my_htonl'},'PUSHi' => {'text' => 'Push an integer onto the stack. The stack must have room for this element. |
2452
|
|
|
|
|
|
|
Handles \'set\' magic. Uses C, so C or C should be |
2453
|
|
|
|
|
|
|
called to declare it. Do not call multiple C-oriented macros to |
2454
|
|
|
|
|
|
|
return lists from XSUB\'s - see C instead. See also C and |
2455
|
|
|
|
|
|
|
C. |
2456
|
|
|
|
|
|
|
|
2457
|
|
|
|
|
|
|
void PUSHi(IV iv)','name' => 'PUSHi'},'is_uni_digit' => {'text' => '','name' => 'is_uni_digit'},'SvLEN_set' => {'text' => 'Set the actual length of the string which is in the SV. See C. |
2458
|
|
|
|
|
|
|
|
2459
|
|
|
|
|
|
|
void SvLEN_set(SV* sv, STRLEN len)','name' => 'SvLEN_set'},'to_utf8_lower' => {'text' => 'Convert the UTF-8 encoded character at p to its lowercase version and |
2460
|
|
|
|
|
|
|
store that in UTF-8 in ustrp and its length in bytes in lenp. Note |
2461
|
|
|
|
|
|
|
that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the |
2462
|
|
|
|
|
|
|
lowercase version may be longer than the original character. |
2463
|
|
|
|
|
|
|
|
2464
|
|
|
|
|
|
|
The first character of the lowercased version is returned |
2465
|
|
|
|
|
|
|
(but note, as explained above, that there may be more.) |
2466
|
|
|
|
|
|
|
|
2467
|
|
|
|
|
|
|
UV to_utf8_lower(const U8 *p, U8* ustrp, STRLEN *lenp)','name' => 'to_utf8_lower'},'new_numeric' => {'text' => '','name' => 'new_numeric'},'newSVpvf' => {'text' => 'Creates a new SV and initializes it with the string formatted like |
2468
|
|
|
|
|
|
|
C. |
2469
|
|
|
|
|
|
|
|
2470
|
|
|
|
|
|
|
SV* newSVpvf(const char *const pat, ...)','name' => 'newSVpvf'},'doing_taint' => {'text' => '','name' => 'doing_taint'},'save_I8' => {'text' => '','name' => 'save_I8'},'Newxc' => {'text' => 'The XSUB-writer\'s interface to the C C function, with |
2471
|
|
|
|
|
|
|
cast. See also C. |
2472
|
|
|
|
|
|
|
|
2473
|
|
|
|
|
|
|
void Newxc(void* ptr, int nitems, type, cast)','name' => 'Newxc'},'SvIVX' => {'text' => 'Returns the raw value in the SV\'s IV slot, without checks or conversions. |
2474
|
|
|
|
|
|
|
Only use when you are sure SvIOK is true. See also C. |
2475
|
|
|
|
|
|
|
|
2476
|
|
|
|
|
|
|
IV SvIVX(SV* sv)','name' => 'SvIVX'},'perl_destruct' => {'text' => 'Shuts down a Perl interpreter. See L. |
2477
|
|
|
|
|
|
|
|
2478
|
|
|
|
|
|
|
int perl_destruct(PerlInterpreter *my_perl)','name' => 'perl_destruct'},'is_utf8_idfirst' => {'text' => '','name' => 'is_utf8_idfirst'},'sv_vsetpvf' => {'text' => 'Works like C but copies the text into the SV instead of |
2479
|
|
|
|
|
|
|
appending it. Does not handle \'set\' magic. See C. |
2480
|
|
|
|
|
|
|
|
2481
|
|
|
|
|
|
|
Usually used via its frontend C. |
2482
|
|
|
|
|
|
|
|
2483
|
|
|
|
|
|
|
void sv_vsetpvf(SV *const sv, const char *const pat, va_list *const args)','name' => 'sv_vsetpvf'},'custom_op_name' => {'text' => '','name' => 'custom_op_name'},'any_dup' => {'text' => '','name' => 'any_dup'},'XCPT_CATCH' => {'text' => 'Introduces a catch block. See L.','name' => 'XCPT_CATCH'},'my_dirfd' => {'text' => '','name' => 'my_dirfd'},'regclass_swash' => {'text' => '','name' => 'regclass_swash'},'SvIOK_off' => {'text' => 'Unsets the IV status of an SV. |
2484
|
|
|
|
|
|
|
|
2485
|
|
|
|
|
|
|
void SvIOK_off(SV* sv)','name' => 'SvIOK_off'},'XST_mYES' => {'text' => 'Place C<&PL_sv_yes> into the specified position C on the |
2486
|
|
|
|
|
|
|
stack. |
2487
|
|
|
|
|
|
|
|
2488
|
|
|
|
|
|
|
void XST_mYES(int pos)','name' => 'XST_mYES'},'sv_setsv' => {'text' => 'Copies the contents of the source SV C into the destination SV |
2489
|
|
|
|
|
|
|
C. The source SV may be destroyed if it is mortal, so don\'t use this |
2490
|
|
|
|
|
|
|
function if the source SV needs to be reused. Does not handle \'set\' magic. |
2491
|
|
|
|
|
|
|
Loosely speaking, it performs a copy-by-value, obliterating any previous |
2492
|
|
|
|
|
|
|
content of the destination. |
2493
|
|
|
|
|
|
|
|
2494
|
|
|
|
|
|
|
You probably want to use one of the assortment of wrappers, such as |
2495
|
|
|
|
|
|
|
C, C, C and |
2496
|
|
|
|
|
|
|
C. |
2497
|
|
|
|
|
|
|
|
2498
|
|
|
|
|
|
|
void sv_setsv(SV *dstr, SV *sstr)','name' => 'sv_setsv'},'PerlIO_stdin' => {'text' => '','name' => 'PerlIO_stdin'},'ix' => {'text' => 'Variable which is setup by C to indicate which of an |
2499
|
|
|
|
|
|
|
XSUB\'s aliases was used to invoke it. See L. |
2500
|
|
|
|
|
|
|
|
2501
|
|
|
|
|
|
|
I32 ix','name' => 'ix'},'XSRETURN_UV' => {'text' => 'Return an integer from an XSUB immediately. Uses C. |
2502
|
|
|
|
|
|
|
|
2503
|
|
|
|
|
|
|
void XSRETURN_UV(IV uv)','name' => 'XSRETURN_UV'},'SvREFCNT_inc_simple' => {'text' => 'Same as SvREFCNT_inc, but can only be used with expressions without side |
2504
|
|
|
|
|
|
|
effects. Since we don\'t have to store a temporary value, it\'s faster. |
2505
|
|
|
|
|
|
|
|
2506
|
|
|
|
|
|
|
SV* SvREFCNT_inc_simple(SV* sv)','name' => 'SvREFCNT_inc_simple'},'my_lstat' => {'text' => '','name' => 'my_lstat'},'my_atof' => {'text' => '','name' => 'my_atof'},'savestack_grow_cnt' => {'text' => '','name' => 'savestack_grow_cnt'},'vverify' => {'text' => 'Validates that the SV contains a valid version object. |
2507
|
|
|
|
|
|
|
|
2508
|
|
|
|
|
|
|
bool vverify(SV *vobj); |
2509
|
|
|
|
|
|
|
|
2510
|
|
|
|
|
|
|
Note that it only confirms the bare minimum structure (so as not to get |
2511
|
|
|
|
|
|
|
confused by derived classes which may contain additional hash entries): |
2512
|
|
|
|
|
|
|
|
2513
|
|
|
|
|
|
|
bool vverify(SV *vs)','name' => 'vverify'},'dXSI32' => {'text' => 'Sets up the C variable for an XSUB which has aliases. This is usually |
2514
|
|
|
|
|
|
|
handled automatically by C. |
2515
|
|
|
|
|
|
|
|
2516
|
|
|
|
|
|
|
dXSI32;','name' => 'dXSI32'},'dXCPT' => {'text' => 'Set up necessary local variables for exception handling. |
2517
|
|
|
|
|
|
|
See L. |
2518
|
|
|
|
|
|
|
|
2519
|
|
|
|
|
|
|
dXCPT;','name' => 'dXCPT'},'sv_tainted' => {'text' => 'Test an SV for taintedness. Use C instead. |
2520
|
|
|
|
|
|
|
bool sv_tainted(SV *const sv)','name' => 'sv_tainted'},'mro_set_private_data' => {'text' => '','name' => 'mro_set_private_data'},'do_gv_dump' => {'text' => '','name' => 'do_gv_dump'},'reg_named_buff_nextkey' => {'text' => '','name' => 'reg_named_buff_nextkey'},'cv_const_sv' => {'text' => 'If C is a constant sub eligible for inlining. returns the constant |
2521
|
|
|
|
|
|
|
value returned by the sub. Otherwise, returns NULL. |
2522
|
|
|
|
|
|
|
|
2523
|
|
|
|
|
|
|
Constant subs can be created with C or as described in |
2524
|
|
|
|
|
|
|
L. |
2525
|
|
|
|
|
|
|
|
2526
|
|
|
|
|
|
|
SV* cv_const_sv(const CV *const cv)','name' => 'cv_const_sv'},'newSVnv' => {'text' => 'Creates a new SV and copies a floating point value into it. |
2527
|
|
|
|
|
|
|
The reference count for the SV is set to 1. |
2528
|
|
|
|
|
|
|
|
2529
|
|
|
|
|
|
|
SV* newSVnv(const NV n)','name' => 'newSVnv'},'HeVAL' => {'text' => 'Returns the value slot (type C) stored in the hash entry. |
2530
|
|
|
|
|
|
|
|
2531
|
|
|
|
|
|
|
SV* HeVAL(HE* he)','name' => 'HeVAL'},'HePV' => {'text' => 'Returns the key slot of the hash entry as a C value, doing any |
2532
|
|
|
|
|
|
|
necessary dereferencing of possibly C keys. The length of the string |
2533
|
|
|
|
|
|
|
is placed in C (this is a macro, so do I use C<&len>). If you do |
2534
|
|
|
|
|
|
|
not care about what the length of the key is, you may use the global |
2535
|
|
|
|
|
|
|
variable C, though this is rather less efficient than using a local |
2536
|
|
|
|
|
|
|
variable. Remember though, that hash keys in perl are free to contain |
2537
|
|
|
|
|
|
|
embedded nulls, so using C or similar is not a good way to find |
2538
|
|
|
|
|
|
|
the length of hash keys. This is very similar to the C macro |
2539
|
|
|
|
|
|
|
described elsewhere in this document. See also C. |
2540
|
|
|
|
|
|
|
|
2541
|
|
|
|
|
|
|
If you are using C to get values to pass to C to create a |
2542
|
|
|
|
|
|
|
new SV, you should consider using C as it is more |
2543
|
|
|
|
|
|
|
efficient. |
2544
|
|
|
|
|
|
|
|
2545
|
|
|
|
|
|
|
char* HePV(HE* he, STRLEN len)','name' => 'HePV'},'hv_free_ent' => {'text' => '','name' => 'hv_free_ent'},'PL_parser' => {'text' => 'Pointer to a structure encapsulating the state of the parsing operation |
2546
|
|
|
|
|
|
|
currently in progress. The pointer can be locally changed to perform |
2547
|
|
|
|
|
|
|
a nested parse without interfering with the state of an outer parse. |
2548
|
|
|
|
|
|
|
Individual members of C have their own documentation.','name' => 'PL_parser'},'SvGETMAGIC' => {'text' => 'Invokes C on an SV if it has \'get\' magic. This macro evaluates its |
2549
|
|
|
|
|
|
|
argument more than once. |
2550
|
|
|
|
|
|
|
|
2551
|
|
|
|
|
|
|
void SvGETMAGIC(SV* sv)','name' => 'SvGETMAGIC'},'pv_uni_display' => {'text' => 'Build to the scalar dsv a displayable version of the string spv, |
2552
|
|
|
|
|
|
|
length len, the displayable version being at most pvlim bytes long |
2553
|
|
|
|
|
|
|
(if longer, the rest is truncated and "..." will be appended). |
2554
|
|
|
|
|
|
|
|
2555
|
|
|
|
|
|
|
The flags argument can have UNI_DISPLAY_ISPRINT set to display |
2556
|
|
|
|
|
|
|
isPRINT()able characters as themselves, UNI_DISPLAY_BACKSLASH |
2557
|
|
|
|
|
|
|
to display the \\\\[nrfta\\\\] as the backslashed versions (like \'\\n\') |
2558
|
|
|
|
|
|
|
(UNI_DISPLAY_BACKSLASH is preferred over UNI_DISPLAY_ISPRINT for \\\\). |
2559
|
|
|
|
|
|
|
UNI_DISPLAY_QQ (and its alias UNI_DISPLAY_REGEX) have both |
2560
|
|
|
|
|
|
|
UNI_DISPLAY_BACKSLASH and UNI_DISPLAY_ISPRINT turned on. |
2561
|
|
|
|
|
|
|
|
2562
|
|
|
|
|
|
|
The pointer to the PV of the dsv is returned. |
2563
|
|
|
|
|
|
|
|
2564
|
|
|
|
|
|
|
char* pv_uni_display(SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags)','name' => 'pv_uni_display'},'init_stacks' => {'text' => '','name' => 'init_stacks'},'sv_inc' => {'text' => 'Auto-increment of the value in the SV, doing string to numeric conversion |
2565
|
|
|
|
|
|
|
if necessary. Handles \'get\' magic. |
2566
|
|
|
|
|
|
|
|
2567
|
|
|
|
|
|
|
void sv_inc(SV *const sv)','name' => 'sv_inc'},'SvPVbytex_force' => {'text' => 'Like C, but converts sv to byte representation first if necessary. |
2568
|
|
|
|
|
|
|
Guarantees to evaluate sv only once; use the more efficient C |
2569
|
|
|
|
|
|
|
otherwise. |
2570
|
|
|
|
|
|
|
|
2571
|
|
|
|
|
|
|
char* SvPVbytex_force(SV* sv, STRLEN len)','name' => 'SvPVbytex_force'},'hv_delete' => {'text' => 'Deletes a key/value pair in the hash. The value SV is removed from the |
2572
|
|
|
|
|
|
|
hash and returned to the caller. The C is the length of the key. |
2573
|
|
|
|
|
|
|
The C value will normally be zero; if set to G_DISCARD then NULL |
2574
|
|
|
|
|
|
|
will be returned. |
2575
|
|
|
|
|
|
|
|
2576
|
|
|
|
|
|
|
SV* hv_delete(HV *hv, const char *key, I32 klen, I32 flags)','name' => 'hv_delete'},'POP_MULTICALL' => {'text' => 'Closing bracket for a lightweight callback. |
2577
|
|
|
|
|
|
|
See L. |
2578
|
|
|
|
|
|
|
|
2579
|
|
|
|
|
|
|
POP_MULTICALL;','name' => 'POP_MULTICALL'},'sv_cat_decode' => {'text' => 'The encoding is assumed to be an Encode object, the PV of the ssv is |
2580
|
|
|
|
|
|
|
assumed to be octets in that encoding and decoding the input starts |
2581
|
|
|
|
|
|
|
from the position which (PV + *offset) pointed to. The dsv will be |
2582
|
|
|
|
|
|
|
concatenated the decoded UTF-8 string from ssv. Decoding will terminate |
2583
|
|
|
|
|
|
|
when the string tstr appears in decoding output or the input ends on |
2584
|
|
|
|
|
|
|
the PV of the ssv. The value which the offset points will be modified |
2585
|
|
|
|
|
|
|
to the last input position on the ssv. |
2586
|
|
|
|
|
|
|
|
2587
|
|
|
|
|
|
|
Returns TRUE if the terminator was found, else returns FALSE. |
2588
|
|
|
|
|
|
|
|
2589
|
|
|
|
|
|
|
bool sv_cat_decode(SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen)','name' => 'sv_cat_decode'},'sv_setiv' => {'text' => 'Copies an integer into the given SV, upgrading first if necessary. |
2590
|
|
|
|
|
|
|
Does not handle \'set\' magic. See also C. |
2591
|
|
|
|
|
|
|
|
2592
|
|
|
|
|
|
|
void sv_setiv(SV *const sv, const IV num)','name' => 'sv_setiv'},'SvIV_set' => {'text' => 'Set the value of the IV pointer in sv to val. It is possible to perform |
2593
|
|
|
|
|
|
|
the same function of this macro with an lvalue assignment to C. |
2594
|
|
|
|
|
|
|
With future Perls, however, it will be more efficient to use |
2595
|
|
|
|
|
|
|
C instead of the lvalue assignment to C. |
2596
|
|
|
|
|
|
|
|
2597
|
|
|
|
|
|
|
void SvIV_set(SV* sv, IV val)','name' => 'SvIV_set'},'gv_efullname' => {'text' => '','name' => 'gv_efullname'},'sv_report_used' => {'text' => 'Dump the contents of all SVs not yet freed. (Debugging aid). |
2598
|
|
|
|
|
|
|
|
2599
|
|
|
|
|
|
|
void sv_report_used()','name' => 'sv_report_used'},'save_sptr' => {'text' => '','name' => 'save_sptr'},'SvNVX' => {'text' => 'Returns the raw value in the SV\'s NV slot, without checks or conversions. |
2600
|
|
|
|
|
|
|
Only use when you are sure SvNOK is true. See also C. |
2601
|
|
|
|
|
|
|
|
2602
|
|
|
|
|
|
|
NV SvNVX(SV* sv)','name' => 'SvNVX'},'do_open' => {'text' => '','name' => 'do_open'},'regnext' => {'text' => '','name' => 'regnext'},'HeHASH' => {'text' => 'Returns the computed hash stored in the hash entry. |
2603
|
|
|
|
|
|
|
|
2604
|
|
|
|
|
|
|
U32 HeHASH(HE* he)','name' => 'HeHASH'},'SvIOK' => {'text' => 'Returns a U32 value indicating whether the SV contains an integer. |
2605
|
|
|
|
|
|
|
|
2606
|
|
|
|
|
|
|
U32 SvIOK(SV* sv)','name' => 'SvIOK'},'newANONHASH' => {'text' => '','name' => 'newANONHASH'},'SvPV_force' => {'text' => 'Like C but will force the SV into containing just a string |
2607
|
|
|
|
|
|
|
(C). You want force if you are going to update the C |
2608
|
|
|
|
|
|
|
directly. |
2609
|
|
|
|
|
|
|
|
2610
|
|
|
|
|
|
|
char* SvPV_force(SV* sv, STRLEN len)','name' => 'SvPV_force'},'HeUTF8' => {'text' => 'Returns whether the C value returned by C is encoded in UTF-8, |
2611
|
|
|
|
|
|
|
doing any necessary dereferencing of possibly C keys. The value returned |
2612
|
|
|
|
|
|
|
will be 0 or non-0, not necessarily 1 (or even a value with any low bits set), |
2613
|
|
|
|
|
|
|
so B blindly assign this to a C variable, as C may be a |
2614
|
|
|
|
|
|
|
typedef for C. |
2615
|
|
|
|
|
|
|
|
2616
|
|
|
|
|
|
|
char* HeUTF8(HE* he)','name' => 'HeUTF8'},'newRANGE' => {'text' => '','name' => 'newRANGE'},'grok_hex' => {'text' => 'converts a string representing a hex number to numeric form. |
2617
|
|
|
|
|
|
|
|
2618
|
|
|
|
|
|
|
On entry I and I<*len> give the string to scan, I<*flags> gives |
2619
|
|
|
|
|
|
|
conversion flags, and I should be NULL or a pointer to an NV. |
2620
|
|
|
|
|
|
|
The scan stops at the end of the string, or the first invalid character. |
2621
|
|
|
|
|
|
|
Unless C is set in I<*flags>, encountering an |
2622
|
|
|
|
|
|
|
invalid character will also trigger a warning. |
2623
|
|
|
|
|
|
|
On return I<*len> is set to the length of the scanned string, |
2624
|
|
|
|
|
|
|
and I<*flags> gives output flags. |
2625
|
|
|
|
|
|
|
|
2626
|
|
|
|
|
|
|
If the value is <= UV_MAX it is returned as a UV, the output flags are clear, |
2627
|
|
|
|
|
|
|
and nothing is written to I<*result>. If the value is > UV_MAX C |
2628
|
|
|
|
|
|
|
returns UV_MAX, sets C in the output flags, |
2629
|
|
|
|
|
|
|
and writes the value to I<*result> (or the value is discarded if I |
2630
|
|
|
|
|
|
|
is NULL). |
2631
|
|
|
|
|
|
|
|
2632
|
|
|
|
|
|
|
The hex number may optionally be prefixed with "0x" or "x" unless |
2633
|
|
|
|
|
|
|
C is set in I<*flags> on entry. If |
2634
|
|
|
|
|
|
|
C is set in I<*flags> then the hex |
2635
|
|
|
|
|
|
|
number may use \'_\' characters to separate digits. |
2636
|
|
|
|
|
|
|
|
2637
|
|
|
|
|
|
|
UV grok_hex(const char* start, STRLEN* len_p, I32* flags, NV *result)','name' => 'grok_hex'},'newRV' => {'text' => '','name' => 'newRV'},'SvLOCK' => {'text' => 'Arranges for a mutual exclusion lock to be obtained on sv if a suitable module |
2638
|
|
|
|
|
|
|
has been loaded. |
2639
|
|
|
|
|
|
|
|
2640
|
|
|
|
|
|
|
void SvLOCK(SV* sv)','name' => 'SvLOCK'},'gv_fetchfile' => {'text' => '','name' => 'gv_fetchfile'},'sv_vsetpvfn' => {'text' => 'Works like C but copies the text into the SV instead of |
2641
|
|
|
|
|
|
|
appending it. |
2642
|
|
|
|
|
|
|
|
2643
|
|
|
|
|
|
|
Usually used via one of its frontends C and C. |
2644
|
|
|
|
|
|
|
|
2645
|
|
|
|
|
|
|
void sv_vsetpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted)','name' => 'sv_vsetpvfn'},'PerlIO_get_cnt' => {'text' => '','name' => 'PerlIO_get_cnt'},'PerlIO_setlinebuf' => {'text' => '','name' => 'PerlIO_setlinebuf'},'utf16_to_utf8_reversed' => {'text' => '','name' => 'utf16_to_utf8_reversed'},'cast_ulong' => {'text' => '','name' => 'cast_ulong'},'to_utf8_case' => {'text' => 'The "p" contains the pointer to the UTF-8 string encoding |
2646
|
|
|
|
|
|
|
the character that is being converted. |
2647
|
|
|
|
|
|
|
|
2648
|
|
|
|
|
|
|
The "ustrp" is a pointer to the character buffer to put the |
2649
|
|
|
|
|
|
|
conversion result to. The "lenp" is a pointer to the length |
2650
|
|
|
|
|
|
|
of the result. |
2651
|
|
|
|
|
|
|
|
2652
|
|
|
|
|
|
|
The "swashp" is a pointer to the swash to use. |
2653
|
|
|
|
|
|
|
|
2654
|
|
|
|
|
|
|
Both the special and normal mappings are stored lib/unicore/To/Foo.pl, |
2655
|
|
|
|
|
|
|
and loaded by SWASHNEW, using lib/utf8_heavy.pl. The special (usually, |
2656
|
|
|
|
|
|
|
but not always, a multicharacter mapping), is tried first. |
2657
|
|
|
|
|
|
|
|
2658
|
|
|
|
|
|
|
The "special" is a string like "utf8::ToSpecLower", which means the |
2659
|
|
|
|
|
|
|
hash %utf8::ToSpecLower. The access to the hash is through |
2660
|
|
|
|
|
|
|
Perl_to_utf8_case(). |
2661
|
|
|
|
|
|
|
|
2662
|
|
|
|
|
|
|
The "normal" is a string like "ToLower" which means the swash |
2663
|
|
|
|
|
|
|
%utf8::ToLower. |
2664
|
|
|
|
|
|
|
|
2665
|
|
|
|
|
|
|
UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special)','name' => 'to_utf8_case'},'set_numeric_local' => {'text' => '','name' => 'set_numeric_local'},'is_utf8_print' => {'text' => '','name' => 'is_utf8_print'},'calloc' => {'text' => '','name' => 'calloc'},'POPpbytex' => {'text' => 'Pops a string off the stack which must consist of bytes i.e. characters < 256. |
2666
|
|
|
|
|
|
|
|
2667
|
|
|
|
|
|
|
char* POPpbytex','name' => 'POPpbytex'},'newPMOP' => {'text' => '','name' => 'newPMOP'},'SvSetMagicSV' => {'text' => 'Like C, but does any set magic required afterwards. |
2668
|
|
|
|
|
|
|
|
2669
|
|
|
|
|
|
|
void SvSetMagicSV(SV* dsb, SV* ssv)','name' => 'SvSetMagicSV'},'Move' => {'text' => 'The XSUB-writer\'s interface to the C C function. The C is the |
2670
|
|
|
|
|
|
|
source, C is the destination, C is the number of items, and C is |
2671
|
|
|
|
|
|
|
the type. Can do overlapping moves. See also C. |
2672
|
|
|
|
|
|
|
|
2673
|
|
|
|
|
|
|
void Move(void* src, void* dest, int nitems, type)','name' => 'Move'},'sv_catpvn_flags' => {'text' => 'Concatenates the string onto the end of the string which is in the SV. The |
2674
|
|
|
|
|
|
|
C indicates number of bytes to copy. If the SV has the UTF-8 |
2675
|
|
|
|
|
|
|
status set, then the bytes appended should be valid UTF-8. |
2676
|
|
|
|
|
|
|
If C has C bit set, will C on C if |
2677
|
|
|
|
|
|
|
appropriate, else not. C and C are implemented |
2678
|
|
|
|
|
|
|
in terms of this function. |
2679
|
|
|
|
|
|
|
|
2680
|
|
|
|
|
|
|
void sv_catpvn_flags(SV *const dstr, const char *sstr, const STRLEN len, const I32 flags)','name' => 'sv_catpvn_flags'},'set_context' => {'text' => '','name' => 'set_context'},'PerlIO_flush' => {'text' => '','name' => 'PerlIO_flush'},'sv_2iv_flags' => {'text' => 'Return the integer value of an SV, doing any necessary string |
2681
|
|
|
|
|
|
|
conversion. If flags includes SV_GMAGIC, does an mg_get() first. |
2682
|
|
|
|
|
|
|
Normally used via the C and C macros. |
2683
|
|
|
|
|
|
|
|
2684
|
|
|
|
|
|
|
IV sv_2iv_flags(SV *const sv, const I32 flags)','name' => 'sv_2iv_flags'},'gv_efullname3' => {'text' => '','name' => 'gv_efullname3'},'runops_standard' => {'text' => '','name' => 'runops_standard'},'isALNUM' => {'text' => 'Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) |
2685
|
|
|
|
|
|
|
alphanumeric character (including underscore) or digit. |
2686
|
|
|
|
|
|
|
|
2687
|
|
|
|
|
|
|
bool isALNUM(char ch)','name' => 'isALNUM'},'newXS' => {'text' => 'Used by C to hook up XSUBs as Perl subs. I needs to be |
2688
|
|
|
|
|
|
|
static storage, as it is used directly as CvFILE(), without a copy being made.','name' => 'newXS'},'XCPT_RETHROW' => {'text' => 'Rethrows a previously caught exception. See L. |
2689
|
|
|
|
|
|
|
|
2690
|
|
|
|
|
|
|
XCPT_RETHROW;','name' => 'XCPT_RETHROW'},'mg_dup' => {'text' => '','name' => 'mg_dup'},'PUSHmortal' => {'text' => 'Push a new mortal SV onto the stack. The stack must have room for this |
2691
|
|
|
|
|
|
|
element. Does not use C. See also C, C and C. |
2692
|
|
|
|
|
|
|
|
2693
|
|
|
|
|
|
|
void PUSHmortal()','name' => 'PUSHmortal'},'perl_alloc' => {'text' => 'Allocates a new Perl interpreter. See L. |
2694
|
|
|
|
|
|
|
|
2695
|
|
|
|
|
|
|
PerlInterpreter* perl_alloc()','name' => 'perl_alloc'},'sv_dump' => {'text' => '','name' => 'sv_dump'},'newSVpvn_flags' => {'text' => 'Creates a new SV and copies a string into it. The reference count for the |
2696
|
|
|
|
|
|
|
SV is set to 1. Note that if C is zero, Perl will create a zero length |
2697
|
|
|
|
|
|
|
string. You are responsible for ensuring that the source string is at least |
2698
|
|
|
|
|
|
|
C bytes long. If the C argument is NULL the new SV will be undefined. |
2699
|
|
|
|
|
|
|
Currently the only flag bits accepted are C and C. |
2700
|
|
|
|
|
|
|
If C is set, then C is called on the result before |
2701
|
|
|
|
|
|
|
returning. If C is set, C is considered to be in UTF-8 and the |
2702
|
|
|
|
|
|
|
C flag will be set on the new SV. |
2703
|
|
|
|
|
|
|
C is a convenience wrapper for this function, defined as |
2704
|
|
|
|
|
|
|
|
2705
|
|
|
|
|
|
|
#define newSVpvn_utf8(s, len, u) \\ |
2706
|
|
|
|
|
|
|
newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) |
2707
|
|
|
|
|
|
|
|
2708
|
|
|
|
|
|
|
SV* newSVpvn_flags(const char *const s, const STRLEN len, const U32 flags)','name' => 'newSVpvn_flags'},'strLE' => {'text' => 'Test two strings to see if the first, C, is less than or equal to the |
2709
|
|
|
|
|
|
|
second, C. Returns true or false. |
2710
|
|
|
|
|
|
|
|
2711
|
|
|
|
|
|
|
bool strLE(char* s1, char* s2)','name' => 'strLE'},'SvOK' => {'text' => 'Returns a U32 value indicating whether the value is defined. This is |
2712
|
|
|
|
|
|
|
only meaningful for scalars. |
2713
|
|
|
|
|
|
|
|
2714
|
|
|
|
|
|
|
U32 SvOK(SV* sv)','name' => 'SvOK'},'sv_compile_2op' => {'text' => '','name' => 'sv_compile_2op'},'sv_setref_nv' => {'text' => 'Copies a double into a new SV, optionally blessing the SV. The C |
2715
|
|
|
|
|
|
|
argument will be upgraded to an RV. That RV will be modified to point to |
2716
|
|
|
|
|
|
|
the new SV. The C argument indicates the package for the |
2717
|
|
|
|
|
|
|
blessing. Set C to C to avoid the blessing. The new SV |
2718
|
|
|
|
|
|
|
will have a reference count of 1, and the RV will be returned. |
2719
|
|
|
|
|
|
|
|
2720
|
|
|
|
|
|
|
SV* sv_setref_nv(SV *const rv, const char *const classname, const NV nv)','name' => 'sv_setref_nv'},'eval_pv' => {'text' => 'Tells Perl to C the given string and return an SV* result. |
2721
|
|
|
|
|
|
|
|
2722
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
2723
|
|
|
|
|
|
|
|
2724
|
|
|
|
|
|
|
SV* eval_pv(const char* p, I32 croak_on_error)','name' => 'eval_pv'},'lex_stuff_pvn' => {'text' => 'Insert characters into the lexer buffer (Llinestr>), |
2725
|
|
|
|
|
|
|
immediately after the current lexing point (Lbufptr>), |
2726
|
|
|
|
|
|
|
reallocating the buffer if necessary. This means that lexing code that |
2727
|
|
|
|
|
|
|
runs later will see the characters as if they had appeared in the input. |
2728
|
|
|
|
|
|
|
It is not recommended to do this as part of normal parsing, and most |
2729
|
|
|
|
|
|
|
uses of this facility run the risk of the inserted characters being |
2730
|
|
|
|
|
|
|
interpreted in an unintended manner. |
2731
|
|
|
|
|
|
|
|
2732
|
|
|
|
|
|
|
The string to be inserted is represented by I octets starting |
2733
|
|
|
|
|
|
|
at I. These octets are interpreted as either UTF-8 or Latin-1, |
2734
|
|
|
|
|
|
|
according to whether the C flag is set in I. |
2735
|
|
|
|
|
|
|
The characters are recoded for the lexer buffer, according to how the |
2736
|
|
|
|
|
|
|
buffer is currently being interpreted (L). If a string |
2737
|
|
|
|
|
|
|
to be interpreted is available as a Perl scalar, the L |
2738
|
|
|
|
|
|
|
function is more convenient. |
2739
|
|
|
|
|
|
|
|
2740
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2741
|
|
|
|
|
|
|
removed without notice. |
2742
|
|
|
|
|
|
|
|
2743
|
|
|
|
|
|
|
void lex_stuff_pvn(char *pv, STRLEN len, U32 flags)','name' => 'lex_stuff_pvn'},'sv_usepvn_flags' => {'text' => 'Tells an SV to use C to find its string value. Normally the |
2744
|
|
|
|
|
|
|
string is stored inside the SV but sv_usepvn allows the SV to use an |
2745
|
|
|
|
|
|
|
outside string. The C should point to memory that was allocated |
2746
|
|
|
|
|
|
|
by C. The string length, C, must be supplied. By default |
2747
|
|
|
|
|
|
|
this function will realloc (i.e. move) the memory pointed to by C, |
2748
|
|
|
|
|
|
|
so that pointer should not be freed or used by the programmer after |
2749
|
|
|
|
|
|
|
giving it to sv_usepvn, and neither should any pointers from "behind" |
2750
|
|
|
|
|
|
|
that pointer (e.g. ptr + 1) be used. |
2751
|
|
|
|
|
|
|
|
2752
|
|
|
|
|
|
|
If C & SV_SMAGIC is true, will call SvSETMAGIC. If C & |
2753
|
|
|
|
|
|
|
SV_HAS_TRAILING_NUL is true, then C must be NUL, and the realloc |
2754
|
|
|
|
|
|
|
will be skipped. (i.e. the buffer is actually at least 1 byte longer than |
2755
|
|
|
|
|
|
|
C, and already meets the requirements for storing in C) |
2756
|
|
|
|
|
|
|
|
2757
|
|
|
|
|
|
|
void sv_usepvn_flags(SV *const sv, char* ptr, const STRLEN len, const U32 flags)','name' => 'sv_usepvn_flags'},'hv_assert' => {'text' => 'Check that a hash is in an internally consistent state. |
2758
|
|
|
|
|
|
|
|
2759
|
|
|
|
|
|
|
void hv_assert(HV *hv)','name' => 'hv_assert'},'my_vsnprintf' => {'text' => 'The C library C if available and standards-compliant. |
2760
|
|
|
|
|
|
|
However, if if the C is not available, will unfortunately |
2761
|
|
|
|
|
|
|
use the unsafe C which can overrun the buffer (there is an |
2762
|
|
|
|
|
|
|
overrun check, but that may be too late). Consider using |
2763
|
|
|
|
|
|
|
C instead, or getting C. |
2764
|
|
|
|
|
|
|
|
2765
|
|
|
|
|
|
|
int my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap)','name' => 'my_vsnprintf'},'sv_free' => {'text' => 'Decrement an SV\'s reference count, and if it drops to zero, call |
2766
|
|
|
|
|
|
|
C to invoke destructors and free up any memory used by |
2767
|
|
|
|
|
|
|
the body; finally, deallocate the SV\'s head itself. |
2768
|
|
|
|
|
|
|
Normally called via a wrapper macro C. |
2769
|
|
|
|
|
|
|
|
2770
|
|
|
|
|
|
|
void sv_free(SV *const sv)','name' => 'sv_free'},'die_nocontext' => {'text' => '','name' => 'die_nocontext'},'hv_eiter_p' => {'text' => '','name' => 'hv_eiter_p'},'SvPVbyte_force' => {'text' => 'Like C, but converts sv to byte representation first if necessary. |
2771
|
|
|
|
|
|
|
|
2772
|
|
|
|
|
|
|
char* SvPVbyte_force(SV* sv, STRLEN len)','name' => 'SvPVbyte_force'},'is_utf8_ascii' => {'text' => '','name' => 'is_utf8_ascii'},'av_pop' => {'text' => 'Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array |
2773
|
|
|
|
|
|
|
is empty. |
2774
|
|
|
|
|
|
|
|
2775
|
|
|
|
|
|
|
SV* av_pop(AV *av)','name' => 'av_pop'},'reg_named_buff_exists' => {'text' => '','name' => 'reg_named_buff_exists'},'ckwarn_d' => {'text' => '','name' => 'ckwarn_d'},'save_bool' => {'text' => '','name' => 'save_bool'},'croak' => {'text' => 'This is the XSUB-writer\'s interface to Perl\'s C function. |
2776
|
|
|
|
|
|
|
Normally call this function the same way you call the C C |
2777
|
|
|
|
|
|
|
function. Calling C returns control directly to Perl, |
2778
|
|
|
|
|
|
|
sidestepping the normal C order of execution. See C. |
2779
|
|
|
|
|
|
|
|
2780
|
|
|
|
|
|
|
If you want to throw an exception object, assign the object to |
2781
|
|
|
|
|
|
|
C<$@> and then pass C to croak(): |
2782
|
|
|
|
|
|
|
|
2783
|
|
|
|
|
|
|
errsv = get_sv("@", GV_ADD); |
2784
|
|
|
|
|
|
|
sv_setsv(errsv, exception_object); |
2785
|
|
|
|
|
|
|
croak(NULL); |
2786
|
|
|
|
|
|
|
|
2787
|
|
|
|
|
|
|
void croak(const char* pat, ...)','name' => 'croak'},'save_freepv' => {'text' => '','name' => 'save_freepv'},'THIS' => {'text' => 'Variable which is setup by C to designate the object in a C++ |
2788
|
|
|
|
|
|
|
XSUB. This is always the proper type for the C++ object. See C and |
2789
|
|
|
|
|
|
|
L. |
2790
|
|
|
|
|
|
|
|
2791
|
|
|
|
|
|
|
(whatever) THIS','name' => 'THIS'},'XSRETURN' => {'text' => 'Return from XSUB, indicating number of items on the stack. This is usually |
2792
|
|
|
|
|
|
|
handled by C. |
2793
|
|
|
|
|
|
|
|
2794
|
|
|
|
|
|
|
void XSRETURN(int nitems)','name' => 'XSRETURN'},'dump_indent' => {'text' => '','name' => 'dump_indent'},'screaminstr' => {'text' => '','name' => 'screaminstr'},'lex_read_unichar' => {'text' => 'Reads the next (Unicode) character in the text currently being lexed. |
2795
|
|
|
|
|
|
|
Returns the codepoint (unsigned integer value) of the character read, |
2796
|
|
|
|
|
|
|
and moves Lbufptr> past the character, or returns -1 |
2797
|
|
|
|
|
|
|
if lexing has reached the end of the input text. To non-destructively |
2798
|
|
|
|
|
|
|
examine the next character, use L instead. |
2799
|
|
|
|
|
|
|
|
2800
|
|
|
|
|
|
|
If the next character is in (or extends into) the next chunk of input |
2801
|
|
|
|
|
|
|
text, the next chunk will be read in. Normally the current chunk will be |
2802
|
|
|
|
|
|
|
discarded at the same time, but if I includes C |
2803
|
|
|
|
|
|
|
then the current chunk will not be discarded. |
2804
|
|
|
|
|
|
|
|
2805
|
|
|
|
|
|
|
If the input is being interpreted as UTF-8 and a UTF-8 encoding error |
2806
|
|
|
|
|
|
|
is encountered, an exception is generated. |
2807
|
|
|
|
|
|
|
|
2808
|
|
|
|
|
|
|
NOTE: this function is experimental and may change or be |
2809
|
|
|
|
|
|
|
removed without notice. |
2810
|
|
|
|
|
|
|
|
2811
|
|
|
|
|
|
|
I32 lex_read_unichar(U32 flags)','name' => 'lex_read_unichar'},'sv_2pv_nolen' => {'text' => 'Like C, but doesn\'t return the length too. You should usually |
2812
|
|
|
|
|
|
|
use the macro wrapper C instead. |
2813
|
|
|
|
|
|
|
char* sv_2pv_nolen(SV* sv)','name' => 'sv_2pv_nolen'},'get_av' => {'text' => 'Returns the AV of the specified Perl array. C are passed to |
2814
|
|
|
|
|
|
|
C. If C is set and the |
2815
|
|
|
|
|
|
|
Perl variable does not exist then it will be created. If C is zero |
2816
|
|
|
|
|
|
|
and the variable does not exist then NULL is returned. |
2817
|
|
|
|
|
|
|
|
2818
|
|
|
|
|
|
|
NOTE: the perl_ form of this function is deprecated. |
2819
|
|
|
|
|
|
|
|
2820
|
|
|
|
|
|
|
AV* get_av(const char *name, I32 flags)','name' => 'get_av'},'reginitcolors' => {'text' => '','name' => 'reginitcolors'},'PoisonFree' => {'text' => 'PoisonWith(0xEF) for catching access to freed memory. |
2821
|
|
|
|
|
|
|
|
2822
|
|
|
|
|
|
|
void PoisonFree(void* dest, int nitems, type)','name' => 'PoisonFree'},'gv_SVadd' => {'text' => '','name' => 'gv_SVadd'},'hv_common' => {'text' => '','name' => 'hv_common'},'newSVREF' => {'text' => '','name' => 'newSVREF'},'toUPPER' => {'text' => 'Converts the specified character to uppercase. Characters outside the |
2823
|
|
|
|
|
|
|
US-ASCII (Basic Latin) range are viewed as not having any case. |
2824
|
|
|
|
|
|
|
|
2825
|
|
|
|
|
|
|
char toUPPER(char ch)','name' => 'toUPPER'},'is_lvalue_sub' => {'text' => '','name' => 'is_lvalue_sub'},'is_utf8_string_loc' => {'text' => 'Like is_utf8_string() but stores the location of the failure (in the |
2826
|
|
|
|
|
|
|
case of "utf8ness failure") or the location s+len (in the case of |
2827
|
|
|
|
|
|
|
"utf8ness success") in the C. |
2828
|
|
|
|
|
|
|
|
2829
|
|
|
|
|
|
|
See also is_utf8_string_loclen() and is_utf8_string(). |
2830
|
|
|
|
|
|
|
|
2831
|
|
|
|
|
|
|
bool is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **p)','name' => 'is_utf8_string_loc'},'sv_gets' => {'text' => 'Get a line from the filehandle and store it into the SV, optionally |
2832
|
|
|
|
|
|
|
appending to the currently-stored string. |
2833
|
|
|
|
|
|
|
|
2834
|
|
|
|
|
|
|
char* sv_gets(SV *const sv, PerlIO *const fp, I32 append)','name' => 'sv_gets'},'SvSetSV_nosteal' => {'text' => 'Calls a non-destructive version of C if dsv is not the same as |
2835
|
|
|
|
|
|
|
ssv. May evaluate arguments more than once. |
2836
|
|
|
|
|
|
|
|
2837
|
|
|
|
|
|
|
void SvSetSV_nosteal(SV* dsv, SV* ssv)','name' => 'SvSetSV_nosteal'},'dUNDERBAR' => {'text' => 'Sets up the C variable for an XSUB that wishes to use |
2838
|
|
|
|
|
|
|
C. |
2839
|
|
|
|
|
|
|
|
2840
|
|
|
|
|
|
|
dUNDERBAR;','name' => 'dUNDERBAR'},'sv_uv' => {'text' => 'A private implementation of the C macro for compilers which can\'t |
2841
|
|
|
|
|
|
|
cope with complex macro expressions. Always use the macro instead. |
2842
|
|
|
|
|
|
|
|
2843
|
|
|
|
|
|
|
UV sv_uv(SV* sv)','name' => 'sv_uv'},'ptr_table_split' => {'text' => '','name' => 'ptr_table_split'},'Nullch' => {'text' => 'Null character pointer. (No longer available when C is defined.)','name' => 'Nullch'},'get_context' => {'text' => '','name' => 'get_context'},'vcroak' => {'text' => '','name' => 'vcroak'},'sv_magicext' => {'text' => 'Adds magic to an SV, upgrading it if necessary. Applies the |
2844
|
|
|
|
|
|
|
supplied vtable and returns a pointer to the magic added. |
2845
|
|
|
|
|
|
|
|
2846
|
|
|
|
|
|
|
Note that C will allow things that C will not. |
2847
|
|
|
|
|
|
|
In particular, you can add magic to SvREADONLY SVs, and add more than |
2848
|
|
|
|
|
|
|
one instance of the same \'how\'. |
2849
|
|
|
|
|
|
|
|
2850
|
|
|
|
|
|
|
If C is greater than zero then a C I of C is |
2851
|
|
|
|
|
|
|
stored, if C is zero then C is stored as-is and - as another |
2852
|
|
|
|
|
|
|
special case - if C<(name && namlen == HEf_SVKEY)> then C is assumed |
2853
|
|
|
|
|
|
|
to contain an C and is stored as-is with its REFCNT incremented. |
2854
|
|
|
|
|
|
|
|
2855
|
|
|
|
|
|
|
(This is now used as a subroutine by C.) |
2856
|
|
|
|
|
|
|
|
2857
|
|
|
|
|
|
|
MAGIC * sv_magicext(SV *const sv, SV *const obj, const int how, const MGVTBL *const vtbl, const char *const name, const I32 namlen)','name' => 'sv_magicext'},'to_uni_title' => {'text' => '','name' => 'to_uni_title'},'gv_fullname4' => {'text' => '','name' => 'gv_fullname4'},'is_uni_idfirst' => {'text' => '','name' => 'is_uni_idfirst'},'av_push' => {'text' => 'Pushes an SV onto the end of the array. The array will grow automatically |
2858
|
|
|
|
|
|
|
to accommodate the addition. Like C, this takes ownership of one |
2859
|
|
|
|
|
|
|
reference count. |
2860
|
|
|
|
|
|
|
|
2861
|
|
|
|
|
|
|
void av_push(AV *av, SV *val)','name' => 'av_push'},'XSRETURN_NO' => {'text' => 'Return C<&PL_sv_no> from an XSUB immediately. Uses C. |
2862
|
|
|
|
|
|
|
|
2863
|
|
|
|
|
|
|
XSRETURN_NO;','name' => 'XSRETURN_NO'},'POPn' => {'text' => 'Pops a double off the stack. |
2864
|
|
|
|
|
|
|
|
2865
|
|
|
|
|
|
|
NV POPn','name' => 'POPn'},'newRV_noinc' => {'text' => 'Creates an RV wrapper for an SV. The reference count for the original |
2866
|
|
|
|
|
|
|
SV is B incremented. |
2867
|
|
|
|
|
|
|
|
2868
|
|
|
|
|
|
|
SV* newRV_noinc(SV *const sv)','name' => 'newRV_noinc'},'unsharepvn' => {'text' => '','name' => 'unsharepvn'},'my_memcmp' => {'text' => '','name' => 'my_memcmp'},'mfree' => {'text' => '','name' => 'mfree'},'newSLICEOP' => {'text' => '','name' => 'newSLICEOP'},'save_re_context' => {'text' => '','name' => 'save_re_context'},'hv_iterinit' => {'text' => 'Prepares a starting point to traverse a hash table. Returns the number of |
2869
|
|
|
|
|
|
|
keys in the hash (i.e. the same as C). The return value is |
2870
|
|
|
|
|
|
|
currently only meaningful for hashes without tie magic. |
2871
|
|
|
|
|
|
|
|
2872
|
|
|
|
|
|
|
NOTE: Before version 5.004_65, C used to return the number of |
2873
|
|
|
|
|
|
|
hash buckets that happen to be in use. If you still need that esoteric |
2874
|
|
|
|
|
|
|
value, you can get it through the macro C. |
2875
|
|
|
|
|
|
|
|
2876
|
|
|
|
|
|
|
|
2877
|
|
|
|
|
|
|
I32 hv_iterinit(HV *hv)','name' => 'hv_iterinit'}};}; |
2878
|
|
|
|
|
|
|
|
2879
|
7
|
|
|
|
|
240
|
my $self = bless({ |
2880
|
|
|
|
|
|
|
'index' => $VAR1, |
2881
|
|
|
|
|
|
|
perl_version => '5.012000', |
2882
|
|
|
|
|
|
|
} => $class); |
2883
|
7
|
|
|
|
|
1054
|
return $self; |
2884
|
|
|
|
|
|
|
} |
2885
|
|
|
|
|
|
|
|
2886
|
|
|
|
|
|
|
1; |