line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
/* |
2
|
|
|
|
|
|
|
Copyright (c) 2016 Vickenty Fesunov. |
3
|
|
|
|
|
|
|
All rights reserved. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without |
6
|
|
|
|
|
|
|
modification, are permitted provided that the following conditions are met: |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this |
9
|
|
|
|
|
|
|
list of conditions and the following disclaimer. |
10
|
|
|
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice, |
11
|
|
|
|
|
|
|
this list of conditions and the following disclaimer in the documentation |
12
|
|
|
|
|
|
|
and/or other materials provided with the distribution. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
15
|
|
|
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
16
|
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
17
|
|
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
18
|
|
|
|
|
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
19
|
|
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
20
|
|
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
21
|
|
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22
|
|
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
23
|
|
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24
|
|
|
|
|
|
|
*/ |
25
|
|
|
|
|
|
|
#include "libouroboros.h" |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
void ouroboros_stack_init(pTHX_ ouroboros_stack_t* stack) |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
|
|
|
dXSARGS; |
30
|
0
|
|
|
|
|
|
SP -= items; |
31
|
0
|
|
|
|
|
|
stack->sp = sp; |
32
|
0
|
|
|
|
|
|
stack->mark = mark; |
33
|
0
|
|
|
|
|
|
stack->ax = ax; |
34
|
0
|
|
|
|
|
|
stack->items = items; |
35
|
0
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
int ouroboros_stack_items(pTHX_ ouroboros_stack_t* stack) |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
|
|
|
return stack->items; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#define sp (stack->sp) |
43
|
|
|
|
|
|
|
#define mark (stack->mark) |
44
|
|
|
|
|
|
|
#define ax (stack->ax) |
45
|
|
|
|
|
|
|
#define items (stack->items) |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
SV* ouroboros_stack_fetch(pTHX_ ouroboros_stack_t* stack, SSize_t item) |
48
|
|
|
|
|
|
|
{ |
49
|
0
|
|
|
|
|
|
return ST(item); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
void ouroboros_stack_store(pTHX_ ouroboros_stack_t* stack, SSize_t item, SV* value) |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
|
|
|
ST(item) = value; |
55
|
0
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
int ouroboros_xcpt_try(pTHX_ ouroboros_xcpt_callback_t cb, void* arg) |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
|
|
|
int rc = 0; |
60
|
|
|
|
|
|
|
dJMPENV; |
61
|
0
|
|
|
|
|
|
JMPENV_PUSH(rc); |
62
|
0
|
0
|
|
|
|
|
if (rc == 0) { |
63
|
0
|
|
|
|
|
|
cb(arg); |
64
|
|
|
|
|
|
|
} |
65
|
0
|
|
|
|
|
|
JMPENV_POP; |
66
|
0
|
|
|
|
|
|
return rc; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
void ouroboros_xcpt_rethrow(pTHX_ int rc) |
70
|
|
|
|
|
|
|
{ |
71
|
0
|
0
|
|
|
|
|
JMPENV_JUMP(rc); |
|
|
0
|
|
|
|
|
|
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
U32 ouroboros_perl_hash(pTHX_ U8* key, STRLEN len) |
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
U32 hash; |
77
|
0
|
|
|
|
|
|
PERL_HASH(hash, key, len); |
78
|
0
|
|
|
|
|
|
return hash; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
SV* ouroboros_sv_undef(pTHX) |
82
|
|
|
|
|
|
|
{ |
83
|
0
|
|
|
|
|
|
return &PL_sv_undef; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
0
|
|
|
|
|
|
SV* ouroboros_sv_no(pTHX) |
87
|
|
|
|
|
|
|
{ |
88
|
0
|
|
|
|
|
|
return &PL_sv_no; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
SV* ouroboros_sv_yes(pTHX) |
92
|
|
|
|
|
|
|
{ |
93
|
0
|
|
|
|
|
|
return &PL_sv_yes; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
/* functions { */ |
97
|
0
|
|
|
|
|
|
void ouroboros_stack_putback(pTHX_ ouroboros_stack_t* stack) |
98
|
|
|
|
|
|
|
{ |
99
|
0
|
|
|
|
|
|
PUTBACK; |
100
|
0
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
void ouroboros_stack_extend(pTHX_ ouroboros_stack_t* stack, SSize_t a) |
103
|
|
|
|
|
|
|
{ |
104
|
0
|
0
|
|
|
|
|
EXTEND(SP, a); |
|
|
0
|
|
|
|
|
|
105
|
0
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
void ouroboros_stack_pushmark(pTHX_ ouroboros_stack_t* stack) |
108
|
|
|
|
|
|
|
{ |
109
|
0
|
0
|
|
|
|
|
PUSHMARK(SP); |
110
|
0
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
0
|
|
|
|
|
|
void ouroboros_stack_spagain(pTHX_ ouroboros_stack_t* stack) |
113
|
|
|
|
|
|
|
{ |
114
|
0
|
|
|
|
|
|
SPAGAIN; |
115
|
0
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_sv(pTHX_ ouroboros_stack_t* stack, SV* sv) |
118
|
|
|
|
|
|
|
{ |
119
|
0
|
0
|
|
|
|
|
XPUSHs(sv); |
120
|
0
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_sv_mortal(pTHX_ ouroboros_stack_t* stack, SV* sv) |
123
|
|
|
|
|
|
|
{ |
124
|
0
|
0
|
|
|
|
|
mXPUSHs(sv); |
125
|
0
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_iv(pTHX_ ouroboros_stack_t* stack, IV a) |
128
|
|
|
|
|
|
|
{ |
129
|
0
|
0
|
|
|
|
|
mXPUSHi(a); |
130
|
0
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_uv(pTHX_ ouroboros_stack_t* stack, UV a) |
133
|
|
|
|
|
|
|
{ |
134
|
0
|
0
|
|
|
|
|
mXPUSHu(a); |
135
|
0
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_nv(pTHX_ ouroboros_stack_t* stack, NV a) |
138
|
|
|
|
|
|
|
{ |
139
|
0
|
0
|
|
|
|
|
mXPUSHn(a); |
140
|
0
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_pv(pTHX_ ouroboros_stack_t* stack, const char* a, STRLEN b) |
143
|
|
|
|
|
|
|
{ |
144
|
0
|
0
|
|
|
|
|
mXPUSHp(a, b); |
145
|
0
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
0
|
|
|
|
|
|
void ouroboros_stack_xpush_mortal(pTHX_ ouroboros_stack_t* stack) |
148
|
|
|
|
|
|
|
{ |
149
|
0
|
0
|
|
|
|
|
XPUSHmortal; |
150
|
0
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
|
152
|
0
|
|
|
|
|
|
void ouroboros_stack_push_sv(pTHX_ ouroboros_stack_t* stack, SV* sv) |
153
|
|
|
|
|
|
|
{ |
154
|
0
|
|
|
|
|
|
PUSHs(sv); |
155
|
0
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
0
|
|
|
|
|
|
void ouroboros_stack_push_sv_mortal(pTHX_ ouroboros_stack_t* stack, SV* sv) |
158
|
|
|
|
|
|
|
{ |
159
|
0
|
|
|
|
|
|
mPUSHs(sv); |
160
|
0
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
0
|
|
|
|
|
|
void ouroboros_stack_push_iv(pTHX_ ouroboros_stack_t* stack, IV a) |
163
|
|
|
|
|
|
|
{ |
164
|
0
|
|
|
|
|
|
mPUSHi(a); |
165
|
0
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
0
|
|
|
|
|
|
void ouroboros_stack_push_uv(pTHX_ ouroboros_stack_t* stack, UV a) |
168
|
|
|
|
|
|
|
{ |
169
|
0
|
|
|
|
|
|
mPUSHu(a); |
170
|
0
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
0
|
|
|
|
|
|
void ouroboros_stack_push_nv(pTHX_ ouroboros_stack_t* stack, NV a) |
173
|
|
|
|
|
|
|
{ |
174
|
0
|
|
|
|
|
|
mPUSHn(a); |
175
|
0
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
0
|
|
|
|
|
|
void ouroboros_stack_push_pv(pTHX_ ouroboros_stack_t* stack, const char* a, STRLEN b) |
178
|
|
|
|
|
|
|
{ |
179
|
0
|
|
|
|
|
|
mPUSHp(a, b); |
180
|
0
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
0
|
|
|
|
|
|
void ouroboros_stack_push_mortal(pTHX_ ouroboros_stack_t* stack) |
183
|
|
|
|
|
|
|
{ |
184
|
0
|
|
|
|
|
|
PUSHmortal; |
185
|
0
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
|
187
|
0
|
|
|
|
|
|
void ouroboros_sv_upgrade(pTHX_ SV* sv, svtype a) |
188
|
|
|
|
|
|
|
{ |
189
|
0
|
0
|
|
|
|
|
SvUPGRADE(sv, a); |
190
|
0
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
0
|
|
|
|
|
|
U32 ouroboros_sv_niok(pTHX_ SV* sv) |
193
|
|
|
|
|
|
|
{ |
194
|
0
|
|
|
|
|
|
return SvNIOK(sv); |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
0
|
|
|
|
|
|
U32 ouroboros_sv_niok_priv(pTHX_ SV* sv) |
198
|
|
|
|
|
|
|
{ |
199
|
0
|
|
|
|
|
|
return SvNIOKp(sv); |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
0
|
|
|
|
|
|
void ouroboros_sv_niok_off(pTHX_ SV* sv) |
203
|
|
|
|
|
|
|
{ |
204
|
0
|
|
|
|
|
|
SvNIOK_off(sv); |
205
|
0
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
0
|
|
|
|
|
|
U32 ouroboros_sv_ok(pTHX_ SV* sv) |
208
|
|
|
|
|
|
|
{ |
209
|
0
|
0
|
|
|
|
|
return SvOK(sv); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
|
212
|
0
|
|
|
|
|
|
U32 ouroboros_sv_iok_priv(pTHX_ SV* sv) |
213
|
|
|
|
|
|
|
{ |
214
|
0
|
|
|
|
|
|
return SvIOKp(sv); |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
|
217
|
0
|
|
|
|
|
|
U32 ouroboros_sv_nok_priv(pTHX_ SV* sv) |
218
|
|
|
|
|
|
|
{ |
219
|
0
|
|
|
|
|
|
return SvNOKp(sv); |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
0
|
|
|
|
|
|
U32 ouroboros_sv_pok_priv(pTHX_ SV* sv) |
223
|
|
|
|
|
|
|
{ |
224
|
0
|
|
|
|
|
|
return SvPOKp(sv); |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
|
227
|
0
|
|
|
|
|
|
U32 ouroboros_sv_iok(pTHX_ SV* sv) |
228
|
|
|
|
|
|
|
{ |
229
|
0
|
|
|
|
|
|
return SvIOK(sv); |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
|
232
|
0
|
|
|
|
|
|
void ouroboros_sv_iok_on(pTHX_ SV* sv) |
233
|
|
|
|
|
|
|
{ |
234
|
0
|
|
|
|
|
|
SvIOK_on(sv); |
235
|
0
|
|
|
|
|
|
} |
236
|
|
|
|
|
|
|
|
237
|
0
|
|
|
|
|
|
void ouroboros_sv_iok_off(pTHX_ SV* sv) |
238
|
|
|
|
|
|
|
{ |
239
|
0
|
|
|
|
|
|
SvIOK_off(sv); |
240
|
0
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
0
|
|
|
|
|
|
void ouroboros_sv_iok_only(pTHX_ SV* sv) |
243
|
|
|
|
|
|
|
{ |
244
|
0
|
0
|
|
|
|
|
SvIOK_only(sv); |
245
|
0
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
0
|
|
|
|
|
|
void ouroboros_sv_iok_only_uv(pTHX_ SV* sv) |
248
|
|
|
|
|
|
|
{ |
249
|
0
|
0
|
|
|
|
|
SvIOK_only_UV(sv); |
250
|
0
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
0
|
|
|
|
|
|
bool ouroboros_sv_iok_uv(pTHX_ SV* sv) |
253
|
|
|
|
|
|
|
{ |
254
|
0
|
|
|
|
|
|
return SvIOK_UV(sv); |
255
|
|
|
|
|
|
|
} |
256
|
|
|
|
|
|
|
|
257
|
0
|
|
|
|
|
|
bool ouroboros_sv_uok(pTHX_ SV* sv) |
258
|
|
|
|
|
|
|
{ |
259
|
0
|
|
|
|
|
|
return SvUOK(sv); |
260
|
|
|
|
|
|
|
} |
261
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
|
bool ouroboros_sv_iok_not_uv(pTHX_ SV* sv) |
263
|
|
|
|
|
|
|
{ |
264
|
0
|
|
|
|
|
|
return SvIOK_notUV(sv); |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
0
|
|
|
|
|
|
U32 ouroboros_sv_nok(pTHX_ SV* sv) |
268
|
|
|
|
|
|
|
{ |
269
|
0
|
|
|
|
|
|
return SvNOK(sv); |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
|
272
|
0
|
|
|
|
|
|
void ouroboros_sv_nok_on(pTHX_ SV* sv) |
273
|
|
|
|
|
|
|
{ |
274
|
0
|
|
|
|
|
|
SvNOK_on(sv); |
275
|
0
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
|
277
|
0
|
|
|
|
|
|
void ouroboros_sv_nok_off(pTHX_ SV* sv) |
278
|
|
|
|
|
|
|
{ |
279
|
0
|
|
|
|
|
|
SvNOK_off(sv); |
280
|
0
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
|
282
|
0
|
|
|
|
|
|
void ouroboros_sv_nok_only(pTHX_ SV* sv) |
283
|
|
|
|
|
|
|
{ |
284
|
0
|
0
|
|
|
|
|
SvNOK_only(sv); |
285
|
0
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
|
287
|
0
|
|
|
|
|
|
U32 ouroboros_sv_pok(pTHX_ SV* sv) |
288
|
|
|
|
|
|
|
{ |
289
|
0
|
|
|
|
|
|
return SvPOK(sv); |
290
|
|
|
|
|
|
|
} |
291
|
|
|
|
|
|
|
|
292
|
0
|
|
|
|
|
|
void ouroboros_sv_pok_on(pTHX_ SV* sv) |
293
|
|
|
|
|
|
|
{ |
294
|
0
|
|
|
|
|
|
SvPOK_on(sv); |
295
|
0
|
|
|
|
|
|
} |
296
|
|
|
|
|
|
|
|
297
|
0
|
|
|
|
|
|
void ouroboros_sv_pok_off(pTHX_ SV* sv) |
298
|
|
|
|
|
|
|
{ |
299
|
0
|
|
|
|
|
|
SvPOK_off(sv); |
300
|
0
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
|
302
|
0
|
|
|
|
|
|
void ouroboros_sv_pok_only(pTHX_ SV* sv) |
303
|
|
|
|
|
|
|
{ |
304
|
0
|
|
|
|
|
|
SvPOK_only(sv); |
305
|
0
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
|
307
|
0
|
|
|
|
|
|
void ouroboros_sv_pok_only_utf8(pTHX_ SV* sv) |
308
|
|
|
|
|
|
|
{ |
309
|
0
|
|
|
|
|
|
SvPOK_only_UTF8(sv); |
310
|
0
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
|
312
|
0
|
|
|
|
|
|
bool ouroboros_sv_vok(pTHX_ SV* sv) |
313
|
|
|
|
|
|
|
{ |
314
|
0
|
0
|
|
|
|
|
return SvVOK(sv); |
|
|
0
|
|
|
|
|
|
315
|
|
|
|
|
|
|
} |
316
|
|
|
|
|
|
|
|
317
|
0
|
|
|
|
|
|
U32 ouroboros_sv_ook(pTHX_ SV* sv) |
318
|
|
|
|
|
|
|
{ |
319
|
0
|
|
|
|
|
|
return SvOOK(sv); |
320
|
|
|
|
|
|
|
} |
321
|
|
|
|
|
|
|
|
322
|
0
|
|
|
|
|
|
void ouroboros_sv_ook_offset(pTHX_ SV* sv, STRLEN* a) |
323
|
|
|
|
|
|
|
{ |
324
|
0
|
0
|
|
|
|
|
SvOOK_offset(sv, *a); |
|
|
0
|
|
|
|
|
|
325
|
0
|
|
|
|
|
|
} |
326
|
|
|
|
|
|
|
|
327
|
0
|
|
|
|
|
|
U32 ouroboros_sv_rok(pTHX_ SV* sv) |
328
|
|
|
|
|
|
|
{ |
329
|
0
|
|
|
|
|
|
return SvROK(sv); |
330
|
|
|
|
|
|
|
} |
331
|
|
|
|
|
|
|
|
332
|
0
|
|
|
|
|
|
void ouroboros_sv_rok_on(pTHX_ SV* sv) |
333
|
|
|
|
|
|
|
{ |
334
|
0
|
|
|
|
|
|
SvROK_on(sv); |
335
|
0
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
|
337
|
0
|
|
|
|
|
|
void ouroboros_sv_rok_off(pTHX_ SV* sv) |
338
|
|
|
|
|
|
|
{ |
339
|
0
|
|
|
|
|
|
SvROK_off(sv); |
340
|
0
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
0
|
|
|
|
|
|
IV ouroboros_sv_iv(pTHX_ SV* sv) |
343
|
|
|
|
|
|
|
{ |
344
|
0
|
0
|
|
|
|
|
return SvIV(sv); |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
0
|
|
|
|
|
|
IV ouroboros_sv_iv_nomg(pTHX_ SV* sv) |
348
|
|
|
|
|
|
|
{ |
349
|
0
|
0
|
|
|
|
|
return SvIV_nomg(sv); |
350
|
|
|
|
|
|
|
} |
351
|
|
|
|
|
|
|
|
352
|
0
|
|
|
|
|
|
IV ouroboros_sv_iv_raw(pTHX_ SV* sv) |
353
|
|
|
|
|
|
|
{ |
354
|
0
|
|
|
|
|
|
return SvIVX(sv); |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
|
357
|
0
|
|
|
|
|
|
void ouroboros_sv_iv_set(pTHX_ SV* sv, IV a) |
358
|
|
|
|
|
|
|
{ |
359
|
0
|
|
|
|
|
|
SvIV_set(sv, a); |
360
|
0
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
|
362
|
0
|
|
|
|
|
|
UV ouroboros_sv_uv(pTHX_ SV* sv) |
363
|
|
|
|
|
|
|
{ |
364
|
0
|
0
|
|
|
|
|
return SvUV(sv); |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
|
367
|
0
|
|
|
|
|
|
UV ouroboros_sv_uv_nomg(pTHX_ SV* sv) |
368
|
|
|
|
|
|
|
{ |
369
|
0
|
0
|
|
|
|
|
return SvUV_nomg(sv); |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
0
|
|
|
|
|
|
UV ouroboros_sv_uv_raw(pTHX_ SV* sv) |
373
|
|
|
|
|
|
|
{ |
374
|
0
|
|
|
|
|
|
return SvUVX(sv); |
375
|
|
|
|
|
|
|
} |
376
|
|
|
|
|
|
|
|
377
|
0
|
|
|
|
|
|
void ouroboros_sv_uv_set(pTHX_ SV* sv, UV a) |
378
|
|
|
|
|
|
|
{ |
379
|
0
|
|
|
|
|
|
SvUV_set(sv, a); |
380
|
0
|
|
|
|
|
|
} |
381
|
|
|
|
|
|
|
|
382
|
2
|
|
|
|
|
|
NV ouroboros_sv_nv(pTHX_ SV* sv) |
383
|
|
|
|
|
|
|
{ |
384
|
2
|
50
|
|
|
|
|
return SvNV(sv); |
385
|
|
|
|
|
|
|
} |
386
|
|
|
|
|
|
|
|
387
|
0
|
|
|
|
|
|
NV ouroboros_sv_nv_nomg(pTHX_ SV* sv) |
388
|
|
|
|
|
|
|
{ |
389
|
0
|
0
|
|
|
|
|
return SvNV_nomg(sv); |
390
|
|
|
|
|
|
|
} |
391
|
|
|
|
|
|
|
|
392
|
0
|
|
|
|
|
|
NV ouroboros_sv_nv_raw(pTHX_ SV* sv) |
393
|
|
|
|
|
|
|
{ |
394
|
0
|
|
|
|
|
|
return SvNVX(sv); |
395
|
|
|
|
|
|
|
} |
396
|
|
|
|
|
|
|
|
397
|
0
|
|
|
|
|
|
void ouroboros_sv_nv_set(pTHX_ SV* sv, NV a) |
398
|
|
|
|
|
|
|
{ |
399
|
0
|
|
|
|
|
|
SvNV_set(sv, a); |
400
|
0
|
|
|
|
|
|
} |
401
|
|
|
|
|
|
|
|
402
|
0
|
|
|
|
|
|
const char* ouroboros_sv_pv(pTHX_ SV* sv, STRLEN* a) |
403
|
|
|
|
|
|
|
{ |
404
|
0
|
0
|
|
|
|
|
return SvPV(sv, *a); |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
|
407
|
0
|
|
|
|
|
|
const char* ouroboros_sv_pv_nomg(pTHX_ SV* sv, STRLEN* a) |
408
|
|
|
|
|
|
|
{ |
409
|
0
|
0
|
|
|
|
|
return SvPV_nomg(sv, *a); |
410
|
|
|
|
|
|
|
} |
411
|
|
|
|
|
|
|
|
412
|
0
|
|
|
|
|
|
const char* ouroboros_sv_pv_nolen(pTHX_ SV* sv) |
413
|
|
|
|
|
|
|
{ |
414
|
0
|
0
|
|
|
|
|
return SvPV_nolen(sv); |
415
|
|
|
|
|
|
|
} |
416
|
|
|
|
|
|
|
|
417
|
0
|
|
|
|
|
|
const char* ouroboros_sv_pv_nomg_nolen(pTHX_ SV* sv) |
418
|
|
|
|
|
|
|
{ |
419
|
0
|
0
|
|
|
|
|
return SvPV_nomg_nolen(sv); |
420
|
|
|
|
|
|
|
} |
421
|
|
|
|
|
|
|
|
422
|
0
|
|
|
|
|
|
char* ouroboros_sv_pv_raw(pTHX_ SV* sv) |
423
|
|
|
|
|
|
|
{ |
424
|
0
|
|
|
|
|
|
return SvPVX(sv); |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
|
427
|
0
|
|
|
|
|
|
STRLEN ouroboros_sv_pv_cur(pTHX_ SV* sv) |
428
|
|
|
|
|
|
|
{ |
429
|
0
|
|
|
|
|
|
return SvCUR(sv); |
430
|
|
|
|
|
|
|
} |
431
|
|
|
|
|
|
|
|
432
|
0
|
|
|
|
|
|
void ouroboros_sv_pv_cur_set(pTHX_ SV* sv, STRLEN a) |
433
|
|
|
|
|
|
|
{ |
434
|
0
|
|
|
|
|
|
SvCUR_set(sv, a); |
435
|
0
|
|
|
|
|
|
} |
436
|
|
|
|
|
|
|
|
437
|
0
|
|
|
|
|
|
STRLEN ouroboros_sv_pv_len(pTHX_ SV* sv) |
438
|
|
|
|
|
|
|
{ |
439
|
0
|
|
|
|
|
|
return SvLEN(sv); |
440
|
|
|
|
|
|
|
} |
441
|
|
|
|
|
|
|
|
442
|
0
|
|
|
|
|
|
void ouroboros_sv_pv_len_set(pTHX_ SV* sv, STRLEN a) |
443
|
|
|
|
|
|
|
{ |
444
|
0
|
|
|
|
|
|
SvLEN_set(sv, a); |
445
|
0
|
|
|
|
|
|
} |
446
|
|
|
|
|
|
|
|
447
|
0
|
|
|
|
|
|
char* ouroboros_sv_pv_end(pTHX_ SV* sv) |
448
|
|
|
|
|
|
|
{ |
449
|
0
|
|
|
|
|
|
return SvEND(sv); |
450
|
|
|
|
|
|
|
} |
451
|
|
|
|
|
|
|
|
452
|
0
|
|
|
|
|
|
SV* ouroboros_sv_rv(pTHX_ SV* sv) |
453
|
|
|
|
|
|
|
{ |
454
|
0
|
|
|
|
|
|
return SvRV(sv); |
455
|
|
|
|
|
|
|
} |
456
|
|
|
|
|
|
|
|
457
|
0
|
|
|
|
|
|
void ouroboros_sv_rv_set(pTHX_ SV* sv, SV* sv1) |
458
|
|
|
|
|
|
|
{ |
459
|
0
|
|
|
|
|
|
SvRV_set(sv, sv1); |
460
|
0
|
|
|
|
|
|
} |
461
|
|
|
|
|
|
|
|
462
|
0
|
|
|
|
|
|
bool ouroboros_sv_true(pTHX_ SV* sv) |
463
|
|
|
|
|
|
|
{ |
464
|
0
|
0
|
|
|
|
|
return SvTRUE(sv); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
465
|
|
|
|
|
|
|
} |
466
|
|
|
|
|
|
|
|
467
|
0
|
|
|
|
|
|
bool ouroboros_sv_true_nomg(pTHX_ SV* sv) |
468
|
|
|
|
|
|
|
{ |
469
|
0
|
0
|
|
|
|
|
return SvTRUE_nomg(sv); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
470
|
|
|
|
|
|
|
} |
471
|
|
|
|
|
|
|
|
472
|
0
|
|
|
|
|
|
svtype ouroboros_sv_type(pTHX_ SV* sv) |
473
|
|
|
|
|
|
|
{ |
474
|
0
|
|
|
|
|
|
return SvTYPE(sv); |
475
|
|
|
|
|
|
|
} |
476
|
|
|
|
|
|
|
|
477
|
0
|
|
|
|
|
|
UV ouroboros_sv_flags(pTHX_ SV* sv) |
478
|
|
|
|
|
|
|
{ |
479
|
0
|
|
|
|
|
|
return SvFLAGS(sv); |
480
|
|
|
|
|
|
|
} |
481
|
|
|
|
|
|
|
|
482
|
0
|
|
|
|
|
|
bool ouroboros_sv_utf8(pTHX_ SV* sv) |
483
|
|
|
|
|
|
|
{ |
484
|
0
|
|
|
|
|
|
return SvUTF8(sv); |
485
|
|
|
|
|
|
|
} |
486
|
|
|
|
|
|
|
|
487
|
0
|
|
|
|
|
|
void ouroboros_sv_utf8_on(pTHX_ SV* sv) |
488
|
|
|
|
|
|
|
{ |
489
|
0
|
|
|
|
|
|
SvUTF8_on(sv); |
490
|
0
|
|
|
|
|
|
} |
491
|
|
|
|
|
|
|
|
492
|
0
|
|
|
|
|
|
void ouroboros_sv_utf8_off(pTHX_ SV* sv) |
493
|
|
|
|
|
|
|
{ |
494
|
0
|
|
|
|
|
|
SvUTF8_off(sv); |
495
|
0
|
|
|
|
|
|
} |
496
|
|
|
|
|
|
|
|
497
|
0
|
|
|
|
|
|
U32 ouroboros_sv_is_cow(pTHX_ SV* sv) |
498
|
|
|
|
|
|
|
{ |
499
|
0
|
|
|
|
|
|
return SvIsCOW(sv); |
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
|
502
|
0
|
|
|
|
|
|
bool ouroboros_sv_is_cow_shared_hash(pTHX_ SV* sv) |
503
|
|
|
|
|
|
|
{ |
504
|
0
|
0
|
|
|
|
|
return SvIsCOW_shared_hash(sv); |
|
|
0
|
|
|
|
|
|
505
|
|
|
|
|
|
|
} |
506
|
|
|
|
|
|
|
|
507
|
0
|
|
|
|
|
|
bool ouroboros_sv_tainted(pTHX_ SV* sv) |
508
|
|
|
|
|
|
|
{ |
509
|
0
|
0
|
|
|
|
|
return SvTAINTED(sv); |
|
|
0
|
|
|
|
|
|
510
|
|
|
|
|
|
|
} |
511
|
|
|
|
|
|
|
|
512
|
0
|
|
|
|
|
|
void ouroboros_sv_tainted_on(pTHX_ SV* sv) |
513
|
|
|
|
|
|
|
{ |
514
|
0
|
0
|
|
|
|
|
SvTAINTED_on(sv); |
515
|
0
|
|
|
|
|
|
} |
516
|
|
|
|
|
|
|
|
517
|
0
|
|
|
|
|
|
void ouroboros_sv_tainted_off(pTHX_ SV* sv) |
518
|
|
|
|
|
|
|
{ |
519
|
0
|
0
|
|
|
|
|
SvTAINTED_off(sv); |
520
|
0
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
|
522
|
0
|
|
|
|
|
|
void ouroboros_sv_taint(pTHX_ SV* sv) |
523
|
|
|
|
|
|
|
{ |
524
|
0
|
0
|
|
|
|
|
SvTAINT(sv); |
|
|
0
|
|
|
|
|
|
525
|
0
|
|
|
|
|
|
} |
526
|
|
|
|
|
|
|
|
527
|
0
|
|
|
|
|
|
void ouroboros_sv_share(pTHX_ SV* sv) |
528
|
|
|
|
|
|
|
{ |
529
|
0
|
|
|
|
|
|
SvSHARE(sv); |
530
|
0
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
|
532
|
0
|
|
|
|
|
|
void ouroboros_sv_lock(pTHX_ SV* sv) |
533
|
|
|
|
|
|
|
{ |
534
|
0
|
|
|
|
|
|
SvLOCK(sv); |
535
|
0
|
|
|
|
|
|
} |
536
|
|
|
|
|
|
|
|
537
|
0
|
|
|
|
|
|
void ouroboros_sv_unlock(pTHX_ SV* sv) |
538
|
|
|
|
|
|
|
{ |
539
|
0
|
|
|
|
|
|
SvUNLOCK(sv); |
540
|
0
|
|
|
|
|
|
} |
541
|
|
|
|
|
|
|
|
542
|
0
|
|
|
|
|
|
U32 ouroboros_sv_get_a_magic(pTHX_ SV* sv) |
543
|
|
|
|
|
|
|
{ |
544
|
0
|
0
|
|
|
|
|
return SvGAMAGIC(sv); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
545
|
|
|
|
|
|
|
} |
546
|
|
|
|
|
|
|
|
547
|
0
|
|
|
|
|
|
void ouroboros_sv_magic_set(pTHX_ SV* sv, MAGIC* a) |
548
|
|
|
|
|
|
|
{ |
549
|
0
|
|
|
|
|
|
SvMAGIC_set(sv, a); |
550
|
0
|
|
|
|
|
|
} |
551
|
|
|
|
|
|
|
|
552
|
0
|
|
|
|
|
|
void ouroboros_sv_get_magic(pTHX_ SV* sv) |
553
|
|
|
|
|
|
|
{ |
554
|
0
|
0
|
|
|
|
|
SvGETMAGIC(sv); |
|
|
0
|
|
|
|
|
|
555
|
0
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
|
557
|
0
|
|
|
|
|
|
void ouroboros_sv_set_magic(pTHX_ SV* sv) |
558
|
|
|
|
|
|
|
{ |
559
|
0
|
0
|
|
|
|
|
SvSETMAGIC(sv); |
560
|
0
|
|
|
|
|
|
} |
561
|
|
|
|
|
|
|
|
562
|
0
|
|
|
|
|
|
SV* ouroboros_gv_sv(pTHX_ GV* a) |
563
|
|
|
|
|
|
|
{ |
564
|
0
|
|
|
|
|
|
return GvSV(a); |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
|
567
|
0
|
|
|
|
|
|
AV* ouroboros_gv_av(pTHX_ GV* a) |
568
|
|
|
|
|
|
|
{ |
569
|
0
|
|
|
|
|
|
return GvAV(a); |
570
|
|
|
|
|
|
|
} |
571
|
|
|
|
|
|
|
|
572
|
0
|
|
|
|
|
|
HV* ouroboros_gv_hv(pTHX_ GV* a) |
573
|
|
|
|
|
|
|
{ |
574
|
0
|
|
|
|
|
|
return GvHV(a); |
575
|
|
|
|
|
|
|
} |
576
|
|
|
|
|
|
|
|
577
|
0
|
|
|
|
|
|
CV* ouroboros_gv_cv(pTHX_ CV* a) |
578
|
|
|
|
|
|
|
{ |
579
|
0
|
|
|
|
|
|
return GvCV(a); |
580
|
|
|
|
|
|
|
} |
581
|
|
|
|
|
|
|
|
582
|
0
|
|
|
|
|
|
HV* ouroboros_sv_stash(pTHX_ SV* sv) |
583
|
|
|
|
|
|
|
{ |
584
|
0
|
|
|
|
|
|
return SvSTASH(sv); |
585
|
|
|
|
|
|
|
} |
586
|
|
|
|
|
|
|
|
587
|
0
|
|
|
|
|
|
void ouroboros_sv_stash_set(pTHX_ SV* sv, HV* a) |
588
|
|
|
|
|
|
|
{ |
589
|
0
|
|
|
|
|
|
SvSTASH_set(sv, a); |
590
|
0
|
|
|
|
|
|
} |
591
|
|
|
|
|
|
|
|
592
|
0
|
|
|
|
|
|
void ouroboros_cv_stash(pTHX_ CV* a) |
593
|
|
|
|
|
|
|
{ |
594
|
0
|
|
|
|
|
|
CvSTASH(a); |
595
|
0
|
|
|
|
|
|
} |
596
|
|
|
|
|
|
|
|
597
|
0
|
|
|
|
|
|
const char* ouroboros_hv_name(pTHX_ HV* a) |
598
|
|
|
|
|
|
|
{ |
599
|
0
|
0
|
|
|
|
|
return HvNAME(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
600
|
|
|
|
|
|
|
} |
601
|
|
|
|
|
|
|
|
602
|
0
|
|
|
|
|
|
STRLEN ouroboros_hv_name_len(pTHX_ HV* a) |
603
|
|
|
|
|
|
|
{ |
604
|
0
|
0
|
|
|
|
|
return HvNAMELEN(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
605
|
|
|
|
|
|
|
} |
606
|
|
|
|
|
|
|
|
607
|
0
|
|
|
|
|
|
unsigned char ouroboros_hv_name_utf8(pTHX_ HV* a) |
608
|
|
|
|
|
|
|
{ |
609
|
0
|
0
|
|
|
|
|
return HvNAMEUTF8(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
610
|
|
|
|
|
|
|
} |
611
|
|
|
|
|
|
|
|
612
|
0
|
|
|
|
|
|
const char* ouroboros_hv_ename(pTHX_ HV* a) |
613
|
|
|
|
|
|
|
{ |
614
|
0
|
0
|
|
|
|
|
return HvENAME(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
615
|
|
|
|
|
|
|
} |
616
|
|
|
|
|
|
|
|
617
|
0
|
|
|
|
|
|
STRLEN ouroboros_hv_ename_len(pTHX_ HV* a) |
618
|
|
|
|
|
|
|
{ |
619
|
0
|
0
|
|
|
|
|
return HvENAMELEN(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
620
|
|
|
|
|
|
|
} |
621
|
|
|
|
|
|
|
|
622
|
0
|
|
|
|
|
|
unsigned char ouroboros_hv_ename_utf8(pTHX_ HV* a) |
623
|
|
|
|
|
|
|
{ |
624
|
0
|
0
|
|
|
|
|
return HvENAMEUTF8(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
625
|
|
|
|
|
|
|
} |
626
|
|
|
|
|
|
|
|
627
|
0
|
|
|
|
|
|
const char* ouroboros_he_pv(pTHX_ HE* a, STRLEN* b) |
628
|
|
|
|
|
|
|
{ |
629
|
0
|
0
|
|
|
|
|
return HePV(a, *b); |
|
|
0
|
|
|
|
|
|
630
|
|
|
|
|
|
|
} |
631
|
|
|
|
|
|
|
|
632
|
0
|
|
|
|
|
|
SV* ouroboros_he_val(pTHX_ HE* a) |
633
|
|
|
|
|
|
|
{ |
634
|
0
|
|
|
|
|
|
return HeVAL(a); |
635
|
|
|
|
|
|
|
} |
636
|
|
|
|
|
|
|
|
637
|
0
|
|
|
|
|
|
U32 ouroboros_he_hash(pTHX_ HE* a) |
638
|
|
|
|
|
|
|
{ |
639
|
0
|
|
|
|
|
|
return HeHASH(a); |
640
|
|
|
|
|
|
|
} |
641
|
|
|
|
|
|
|
|
642
|
0
|
|
|
|
|
|
SV* ouroboros_he_svkey(pTHX_ HE* a) |
643
|
|
|
|
|
|
|
{ |
644
|
0
|
0
|
|
|
|
|
return HeSVKEY(a); |
|
|
0
|
|
|
|
|
|
645
|
|
|
|
|
|
|
} |
646
|
|
|
|
|
|
|
|
647
|
0
|
|
|
|
|
|
SV* ouroboros_he_svkey_force(pTHX_ HE* a) |
648
|
|
|
|
|
|
|
{ |
649
|
0
|
0
|
|
|
|
|
return HeSVKEY_force(a); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
650
|
|
|
|
|
|
|
} |
651
|
|
|
|
|
|
|
|
652
|
0
|
|
|
|
|
|
SV* ouroboros_he_svkey_set(pTHX_ HE* a, SV* sv) |
653
|
|
|
|
|
|
|
{ |
654
|
0
|
|
|
|
|
|
return HeSVKEY_set(a, sv); |
655
|
|
|
|
|
|
|
} |
656
|
|
|
|
|
|
|
|
657
|
0
|
|
|
|
|
|
U32 ouroboros_sv_refcnt(pTHX_ SV* sv) |
658
|
|
|
|
|
|
|
{ |
659
|
0
|
|
|
|
|
|
return SvREFCNT(sv); |
660
|
|
|
|
|
|
|
} |
661
|
|
|
|
|
|
|
|
662
|
0
|
|
|
|
|
|
SV* ouroboros_sv_refcnt_inc(pTHX_ SV* sv) |
663
|
|
|
|
|
|
|
{ |
664
|
0
|
|
|
|
|
|
return SvREFCNT_inc_simple(sv); |
665
|
|
|
|
|
|
|
} |
666
|
|
|
|
|
|
|
|
667
|
0
|
|
|
|
|
|
SV* ouroboros_sv_refcnt_inc_nn(pTHX_ SV* sv) |
668
|
|
|
|
|
|
|
{ |
669
|
0
|
|
|
|
|
|
return SvREFCNT_inc_simple_NN(sv); |
670
|
|
|
|
|
|
|
} |
671
|
|
|
|
|
|
|
|
672
|
0
|
|
|
|
|
|
void ouroboros_sv_refcnt_inc_void(pTHX_ SV* sv) |
673
|
|
|
|
|
|
|
{ |
674
|
0
|
0
|
|
|
|
|
SvREFCNT_inc_simple_void(sv); |
675
|
0
|
|
|
|
|
|
} |
676
|
|
|
|
|
|
|
|
677
|
0
|
|
|
|
|
|
void ouroboros_sv_refcnt_inc_void_nn(pTHX_ SV* sv) |
678
|
|
|
|
|
|
|
{ |
679
|
0
|
|
|
|
|
|
SvREFCNT_inc_simple_void_NN(sv); |
680
|
0
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
|
682
|
0
|
|
|
|
|
|
void ouroboros_sv_refcnt_dec(pTHX_ SV* sv) |
683
|
|
|
|
|
|
|
{ |
684
|
0
|
|
|
|
|
|
SvREFCNT_dec(sv); |
685
|
0
|
|
|
|
|
|
} |
686
|
|
|
|
|
|
|
|
687
|
0
|
|
|
|
|
|
void ouroboros_sv_refcnt_dec_nn(pTHX_ SV* sv) |
688
|
|
|
|
|
|
|
{ |
689
|
0
|
|
|
|
|
|
SvREFCNT_dec_NN(sv); |
690
|
0
|
|
|
|
|
|
} |
691
|
|
|
|
|
|
|
|
692
|
0
|
|
|
|
|
|
void ouroboros_enter(pTHX) |
693
|
|
|
|
|
|
|
{ |
694
|
0
|
|
|
|
|
|
ENTER; |
695
|
0
|
|
|
|
|
|
} |
696
|
|
|
|
|
|
|
|
697
|
0
|
|
|
|
|
|
void ouroboros_leave(pTHX) |
698
|
|
|
|
|
|
|
{ |
699
|
0
|
|
|
|
|
|
LEAVE; |
700
|
0
|
|
|
|
|
|
} |
701
|
|
|
|
|
|
|
|
702
|
0
|
|
|
|
|
|
void ouroboros_savetmps(pTHX) |
703
|
|
|
|
|
|
|
{ |
704
|
0
|
|
|
|
|
|
SAVETMPS; |
705
|
0
|
|
|
|
|
|
} |
706
|
|
|
|
|
|
|
|
707
|
0
|
|
|
|
|
|
void ouroboros_freetmps(pTHX) |
708
|
|
|
|
|
|
|
{ |
709
|
0
|
0
|
|
|
|
|
FREETMPS; |
710
|
0
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
|
712
|
0
|
|
|
|
|
|
void ouroboros_sys_init3(int* a, char*** b, char*** c) |
713
|
|
|
|
|
|
|
{ |
714
|
0
|
|
|
|
|
|
PERL_SYS_INIT3(a, b, c); |
715
|
0
|
|
|
|
|
|
} |
716
|
|
|
|
|
|
|
|
717
|
0
|
|
|
|
|
|
void ouroboros_sys_term() |
718
|
|
|
|
|
|
|
{ |
719
|
0
|
|
|
|
|
|
PERL_SYS_TERM(); |
720
|
0
|
|
|
|
|
|
} |
721
|
|
|
|
|
|
|
|
722
|
0
|
|
|
|
|
|
U32 ouroboros_gimme(pTHX) |
723
|
|
|
|
|
|
|
{ |
724
|
0
|
0
|
|
|
|
|
return GIMME_V; |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
/* } */ |