| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* |
|
2
|
|
|
|
|
|
|
* This file was generated automatically by ExtUtils::ParseXS version 3.34 from the |
|
3
|
|
|
|
|
|
|
* contents of typemap.xs. Do not edit this file, edit typemap.xs instead. |
|
4
|
|
|
|
|
|
|
* |
|
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
|
6
|
|
|
|
|
|
|
* |
|
7
|
|
|
|
|
|
|
*/ |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "t/typemap/typemap.xs" |
|
10
|
|
|
|
|
|
|
#include |
|
11
|
|
|
|
|
|
|
#include |
|
12
|
|
|
|
|
|
|
#include |
|
13
|
|
|
|
|
|
|
#include "tmtest.h" |
|
14
|
|
|
|
|
|
|
#include |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
using namespace xs; |
|
17
|
|
|
|
|
|
|
using panda::ErrorCode; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
DCnt dcnt; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#line 22 "t/typemap/typemap_xsgen.cc" |
|
22
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
|
23
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
|
24
|
|
|
|
|
|
|
#endif |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#ifndef dVAR |
|
27
|
|
|
|
|
|
|
# define dVAR dNOOP |
|
28
|
|
|
|
|
|
|
#endif |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
|
32
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
|
33
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
|
34
|
|
|
|
|
|
|
#endif |
|
35
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
|
36
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
|
37
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
|
38
|
|
|
|
|
|
|
#endif |
|
39
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
|
40
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
|
41
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
|
42
|
|
|
|
|
|
|
#endif |
|
43
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
|
44
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
|
45
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
|
46
|
|
|
|
|
|
|
#endif |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
|
49
|
|
|
|
|
|
|
* XS macro. |
|
50
|
|
|
|
|
|
|
* |
|
51
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
|
52
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
|
53
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
|
54
|
|
|
|
|
|
|
* |
|
55
|
|
|
|
|
|
|
* See XSUB.h in core! |
|
56
|
|
|
|
|
|
|
*/ |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
|
60
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
|
61
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
|
62
|
|
|
|
|
|
|
# undef XS_INTERNAL |
|
63
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
|
64
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
|
65
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
66
|
|
|
|
|
|
|
# endif |
|
67
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
|
68
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
|
69
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
|
70
|
|
|
|
|
|
|
# endif |
|
71
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
|
72
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
|
73
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
|
74
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
|
75
|
|
|
|
|
|
|
# else |
|
76
|
|
|
|
|
|
|
# ifdef __cplusplus |
|
77
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
|
78
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
|
79
|
|
|
|
|
|
|
# else |
|
80
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
|
81
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
82
|
|
|
|
|
|
|
# endif |
|
83
|
|
|
|
|
|
|
# endif |
|
84
|
|
|
|
|
|
|
# endif |
|
85
|
|
|
|
|
|
|
#endif |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
|
91
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
|
92
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
|
93
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
|
94
|
|
|
|
|
|
|
*/ |
|
95
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
|
96
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
|
97
|
|
|
|
|
|
|
#endif |
|
98
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
|
99
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
|
100
|
|
|
|
|
|
|
#endif |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
|
103
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
|
104
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
|
105
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
|
106
|
|
|
|
|
|
|
*/ |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
#undef XS_EUPXS |
|
109
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
|
110
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
|
111
|
|
|
|
|
|
|
#else |
|
112
|
|
|
|
|
|
|
/* default to internal */ |
|
113
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
|
114
|
|
|
|
|
|
|
#endif |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
117
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
|
120
|
|
|
|
|
|
|
STATIC void |
|
121
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
STATIC void |
|
124
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
|
125
|
|
|
|
|
|
|
{ |
|
126
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
if (gv) { |
|
131
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
|
132
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
|
133
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
if (hvname) |
|
136
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
|
137
|
|
|
|
|
|
|
else |
|
138
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
|
139
|
|
|
|
|
|
|
} else { |
|
140
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
|
141
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
|
142
|
|
|
|
|
|
|
} |
|
143
|
|
|
|
|
|
|
} |
|
144
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#endif |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
|
151
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
|
152
|
|
|
|
|
|
|
*/ |
|
153
|
|
|
|
|
|
|
#ifdef newXS_flags |
|
154
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
|
155
|
|
|
|
|
|
|
#else |
|
156
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
|
157
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
160
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
|
161
|
|
|
|
|
|
|
#else |
|
162
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
|
163
|
|
|
|
|
|
|
#endif |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
#line 166 "t/typemap/typemap_xsgen.cc" |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
|
168
|
222
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_dcnt) { xs::throw_guard(cv, [=]() |
|
169
|
|
|
|
|
|
|
{ |
|
170
|
111
|
|
|
|
|
|
dVAR; dXSARGS; |
|
171
|
111
|
50
|
|
|
|
|
if (items != 0) |
|
172
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
173
|
|
|
|
|
|
|
{ |
|
174
|
|
|
|
|
|
|
AV * RETVAL; |
|
175
|
|
|
|
|
|
|
#line 21 "t/typemap/typemap.xs" |
|
176
|
|
|
|
|
|
|
RETVAL = newAV(); |
|
177
|
|
|
|
|
|
|
av_push(RETVAL, newSViv(dcnt.c)); |
|
178
|
|
|
|
|
|
|
av_push(RETVAL, newSViv(dcnt.perl)); |
|
179
|
|
|
|
|
|
|
dcnt.c = 0; |
|
180
|
|
|
|
|
|
|
dcnt.perl = 0; |
|
181
|
|
|
|
|
|
|
#line 182 "t/typemap/typemap_xsgen.cc" |
|
182
|
|
|
|
|
|
|
{ |
|
183
|
|
|
|
|
|
|
SV * RETVALSV; |
|
184
|
111
|
50
|
|
|
|
|
RETVALSV = RETVAL ? newRV_noinc((SV*)RETVAL) : &PL_sv_undef; |
|
185
|
111
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
186
|
111
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
187
|
|
|
|
|
|
|
} |
|
188
|
|
|
|
|
|
|
} |
|
189
|
111
|
|
|
|
|
|
XSRETURN(1); |
|
190
|
111
|
50
|
|
|
|
|
}); } |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
/* INCLUDE: Including 'primitives.xsi' from 'typemap.xs' */ |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
|
|
197
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_i8) { xs::throw_guard(cv, [=]() |
|
198
|
|
|
|
|
|
|
{ |
|
199
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
200
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
201
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
202
|
|
|
|
|
|
|
{ |
|
203
|
|
|
|
|
|
|
int8_t RETVAL; |
|
204
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
205
|
3
|
50
|
|
|
|
|
int8_t val = (int8_t)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
; |
|
207
|
|
|
|
|
|
|
#line 5 "t/typemap/primitives.xsi" |
|
208
|
|
|
|
|
|
|
RETVAL = val; |
|
209
|
|
|
|
|
|
|
#line 210 "t/typemap/typemap_xsgen.cc" |
|
210
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
} |
|
212
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
213
|
3
|
50
|
|
|
|
|
}); } |
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
|
217
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_i16) { xs::throw_guard(cv, [=]() |
|
218
|
|
|
|
|
|
|
{ |
|
219
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
220
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
221
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
222
|
|
|
|
|
|
|
{ |
|
223
|
|
|
|
|
|
|
int16_t RETVAL; |
|
224
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
225
|
3
|
50
|
|
|
|
|
int16_t val = (int16_t)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
; |
|
227
|
|
|
|
|
|
|
#line 9 "t/typemap/primitives.xsi" |
|
228
|
|
|
|
|
|
|
RETVAL = val; |
|
229
|
|
|
|
|
|
|
#line 230 "t/typemap/typemap_xsgen.cc" |
|
230
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
} |
|
232
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
233
|
3
|
50
|
|
|
|
|
}); } |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
|
|
237
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_i32) { xs::throw_guard(cv, [=]() |
|
238
|
|
|
|
|
|
|
{ |
|
239
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
240
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
241
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
242
|
|
|
|
|
|
|
{ |
|
243
|
|
|
|
|
|
|
int32_t RETVAL; |
|
244
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
245
|
3
|
50
|
|
|
|
|
int32_t val = (int32_t)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
; |
|
247
|
|
|
|
|
|
|
#line 13 "t/typemap/primitives.xsi" |
|
248
|
|
|
|
|
|
|
RETVAL = val; |
|
249
|
|
|
|
|
|
|
#line 250 "t/typemap/typemap_xsgen.cc" |
|
250
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
} |
|
252
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
253
|
3
|
50
|
|
|
|
|
}); } |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
|
|
257
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_i64) { xs::throw_guard(cv, [=]() |
|
258
|
|
|
|
|
|
|
{ |
|
259
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
260
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
261
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
262
|
|
|
|
|
|
|
{ |
|
263
|
|
|
|
|
|
|
int64_t RETVAL; |
|
264
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
265
|
3
|
50
|
|
|
|
|
int64_t val = (int64_t)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
; |
|
267
|
|
|
|
|
|
|
#line 17 "t/typemap/primitives.xsi" |
|
268
|
|
|
|
|
|
|
RETVAL = val; |
|
269
|
|
|
|
|
|
|
#line 270 "t/typemap/typemap_xsgen.cc" |
|
270
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
} |
|
272
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
273
|
3
|
50
|
|
|
|
|
}); } |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
|
277
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_u8) { xs::throw_guard(cv, [=]() |
|
278
|
|
|
|
|
|
|
{ |
|
279
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
280
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
281
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
282
|
|
|
|
|
|
|
{ |
|
283
|
|
|
|
|
|
|
uint8_t RETVAL; |
|
284
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
285
|
4
|
50
|
|
|
|
|
uint8_t val = (uint8_t)SvUV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
; |
|
287
|
|
|
|
|
|
|
#line 21 "t/typemap/primitives.xsi" |
|
288
|
|
|
|
|
|
|
RETVAL = val; |
|
289
|
|
|
|
|
|
|
#line 290 "t/typemap/typemap_xsgen.cc" |
|
290
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
} |
|
292
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
293
|
4
|
50
|
|
|
|
|
}); } |
|
294
|
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
|
|
297
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_u16) { xs::throw_guard(cv, [=]() |
|
298
|
|
|
|
|
|
|
{ |
|
299
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
300
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
301
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
302
|
|
|
|
|
|
|
{ |
|
303
|
|
|
|
|
|
|
uint16_t RETVAL; |
|
304
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
305
|
4
|
50
|
|
|
|
|
uint16_t val = (uint16_t)SvUV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
; |
|
307
|
|
|
|
|
|
|
#line 25 "t/typemap/primitives.xsi" |
|
308
|
|
|
|
|
|
|
RETVAL = val; |
|
309
|
|
|
|
|
|
|
#line 310 "t/typemap/typemap_xsgen.cc" |
|
310
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
} |
|
312
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
313
|
4
|
50
|
|
|
|
|
}); } |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
|
317
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_u32) { xs::throw_guard(cv, [=]() |
|
318
|
|
|
|
|
|
|
{ |
|
319
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
320
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
321
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
322
|
|
|
|
|
|
|
{ |
|
323
|
|
|
|
|
|
|
uint32_t RETVAL; |
|
324
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
325
|
3
|
50
|
|
|
|
|
uint32_t val = (uint32_t)SvUV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
; |
|
327
|
|
|
|
|
|
|
#line 29 "t/typemap/primitives.xsi" |
|
328
|
|
|
|
|
|
|
RETVAL = val; |
|
329
|
|
|
|
|
|
|
#line 330 "t/typemap/typemap_xsgen.cc" |
|
330
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
} |
|
332
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
333
|
3
|
50
|
|
|
|
|
}); } |
|
334
|
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
|
337
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_u64) { xs::throw_guard(cv, [=]() |
|
338
|
|
|
|
|
|
|
{ |
|
339
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
340
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
341
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
342
|
|
|
|
|
|
|
{ |
|
343
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
344
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
345
|
3
|
100
|
|
|
|
|
uint64_t val = (uint64_t)SvUV(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
; |
|
347
|
|
|
|
|
|
|
#line 33 "t/typemap/primitives.xsi" |
|
348
|
|
|
|
|
|
|
RETVAL = val; |
|
349
|
|
|
|
|
|
|
#line 350 "t/typemap/typemap_xsgen.cc" |
|
350
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
} |
|
352
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
353
|
3
|
50
|
|
|
|
|
}); } |
|
354
|
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
|
|
357
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_time_t) { xs::throw_guard(cv, [=]() |
|
358
|
|
|
|
|
|
|
{ |
|
359
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
360
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
361
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
362
|
|
|
|
|
|
|
{ |
|
363
|
|
|
|
|
|
|
time_t RETVAL; |
|
364
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
365
|
2
|
50
|
|
|
|
|
time_t val = (time_t)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
; |
|
367
|
|
|
|
|
|
|
#line 37 "t/typemap/primitives.xsi" |
|
368
|
|
|
|
|
|
|
RETVAL = val; |
|
369
|
|
|
|
|
|
|
#line 370 "t/typemap/typemap_xsgen.cc" |
|
370
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
} |
|
372
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
373
|
2
|
50
|
|
|
|
|
}); } |
|
374
|
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'primitives.xsi' */ |
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
/* INCLUDE: Including 'svrefs.xsi' from 'typemap.xs' */ |
|
380
|
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
|
|
383
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_av_out) { xs::throw_guard(cv, [=]() |
|
384
|
|
|
|
|
|
|
{ |
|
385
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
386
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
387
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "not_null= false"); |
|
388
|
|
|
|
|
|
|
{ |
|
389
|
|
|
|
|
|
|
AV * RETVAL; |
|
390
|
|
|
|
|
|
|
bool not_null; |
|
391
|
|
|
|
|
|
|
|
|
392
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
393
|
1
|
|
|
|
|
|
not_null = false; |
|
394
|
|
|
|
|
|
|
else { |
|
395
|
1
|
50
|
|
|
|
|
not_null = (bool)SvTRUE(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
396
|
1
|
|
|
|
|
|
; |
|
397
|
|
|
|
|
|
|
} |
|
398
|
|
|
|
|
|
|
#line 5 "t/typemap/svrefs.xsi" |
|
399
|
|
|
|
|
|
|
RETVAL = not_null ? newAV() : NULL; |
|
400
|
|
|
|
|
|
|
#line 401 "t/typemap/typemap_xsgen.cc" |
|
401
|
|
|
|
|
|
|
{ |
|
402
|
|
|
|
|
|
|
SV * RETVALSV; |
|
403
|
2
|
100
|
|
|
|
|
RETVALSV = RETVAL ? newRV_noinc((SV*)RETVAL) : &PL_sv_undef; |
|
404
|
2
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
405
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
406
|
|
|
|
|
|
|
} |
|
407
|
|
|
|
|
|
|
} |
|
408
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
409
|
2
|
50
|
|
|
|
|
}); } |
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
|
|
413
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_av_in) { xs::throw_guard(cv, [=]() |
|
414
|
|
|
|
|
|
|
{ |
|
415
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
416
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
417
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
418
|
|
|
|
|
|
|
{ |
|
419
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
420
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
AV* val; |
|
422
|
|
|
|
|
|
|
|
|
423
|
11
|
100
|
|
|
|
|
if (SvROK(ST(0)) && SvTYPE(SvRV(ST(0))) == SVt_PVAV) val = (AV*)SvRV(ST(0)); |
|
|
|
100
|
|
|
|
|
|
|
424
|
10
|
100
|
|
|
|
|
else if (SvOK(ST(0))) throw "MyTest::av_in() -- val is not an ARRAY reference"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
else val = NULL |
|
426
|
1
|
|
|
|
|
|
; |
|
427
|
|
|
|
|
|
|
#line 9 "t/typemap/svrefs.xsi" |
|
428
|
|
|
|
|
|
|
RETVAL = (uint64_t)val; |
|
429
|
|
|
|
|
|
|
#line 430 "t/typemap/typemap_xsgen.cc" |
|
430
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
} |
|
432
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
433
|
11
|
50
|
|
|
|
|
}); } |
|
434
|
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
|
|
437
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hv_out) { xs::throw_guard(cv, [=]() |
|
438
|
|
|
|
|
|
|
{ |
|
439
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
440
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
441
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "not_null= false"); |
|
442
|
|
|
|
|
|
|
{ |
|
443
|
|
|
|
|
|
|
HV * RETVAL; |
|
444
|
|
|
|
|
|
|
bool not_null; |
|
445
|
|
|
|
|
|
|
|
|
446
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
447
|
1
|
|
|
|
|
|
not_null = false; |
|
448
|
|
|
|
|
|
|
else { |
|
449
|
1
|
50
|
|
|
|
|
not_null = (bool)SvTRUE(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
450
|
1
|
|
|
|
|
|
; |
|
451
|
|
|
|
|
|
|
} |
|
452
|
|
|
|
|
|
|
#line 13 "t/typemap/svrefs.xsi" |
|
453
|
|
|
|
|
|
|
RETVAL = not_null ? newHV() : NULL; |
|
454
|
|
|
|
|
|
|
#line 455 "t/typemap/typemap_xsgen.cc" |
|
455
|
|
|
|
|
|
|
{ |
|
456
|
|
|
|
|
|
|
SV * RETVALSV; |
|
457
|
2
|
100
|
|
|
|
|
RETVALSV = RETVAL ? newRV_noinc((SV*)RETVAL) : &PL_sv_undef; |
|
458
|
2
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
459
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
460
|
|
|
|
|
|
|
} |
|
461
|
|
|
|
|
|
|
} |
|
462
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
463
|
2
|
50
|
|
|
|
|
}); } |
|
464
|
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
|
|
467
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hv_in) { xs::throw_guard(cv, [=]() |
|
468
|
|
|
|
|
|
|
{ |
|
469
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
470
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
471
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
472
|
|
|
|
|
|
|
{ |
|
473
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
474
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
HV* val; |
|
476
|
|
|
|
|
|
|
|
|
477
|
11
|
100
|
|
|
|
|
if (SvROK(ST(0)) && SvTYPE(SvRV(ST(0))) == SVt_PVHV) val = (HV*)SvRV(ST(0)); |
|
|
|
100
|
|
|
|
|
|
|
478
|
10
|
100
|
|
|
|
|
else if (SvOK(ST(0))) throw "MyTest::hv_in() -- val is not a HASH reference"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
else val = NULL |
|
480
|
1
|
|
|
|
|
|
; |
|
481
|
|
|
|
|
|
|
#line 17 "t/typemap/svrefs.xsi" |
|
482
|
|
|
|
|
|
|
RETVAL = (uint64_t)val; |
|
483
|
|
|
|
|
|
|
#line 484 "t/typemap/typemap_xsgen.cc" |
|
484
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
} |
|
486
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
487
|
11
|
50
|
|
|
|
|
}); } |
|
488
|
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
|
|
491
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_io_out) { xs::throw_guard(cv, [=]() |
|
492
|
|
|
|
|
|
|
{ |
|
493
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
494
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
495
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "not_null= false"); |
|
496
|
|
|
|
|
|
|
{ |
|
497
|
|
|
|
|
|
|
IO * RETVAL; |
|
498
|
|
|
|
|
|
|
bool not_null; |
|
499
|
|
|
|
|
|
|
|
|
500
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
501
|
1
|
|
|
|
|
|
not_null = false; |
|
502
|
|
|
|
|
|
|
else { |
|
503
|
1
|
50
|
|
|
|
|
not_null = (bool)SvTRUE(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
504
|
1
|
|
|
|
|
|
; |
|
505
|
|
|
|
|
|
|
} |
|
506
|
|
|
|
|
|
|
#line 21 "t/typemap/svrefs.xsi" |
|
507
|
|
|
|
|
|
|
if (not_null) { |
|
508
|
|
|
|
|
|
|
GV* gv = gv_fetchpv("STDOUT", 0, SVt_PVIO); |
|
509
|
|
|
|
|
|
|
RETVAL = GvIO(gv); |
|
510
|
|
|
|
|
|
|
} |
|
511
|
|
|
|
|
|
|
else RETVAL = NULL; |
|
512
|
|
|
|
|
|
|
#line 513 "t/typemap/typemap_xsgen.cc" |
|
513
|
|
|
|
|
|
|
{ |
|
514
|
|
|
|
|
|
|
SV * RETVALSV; |
|
515
|
2
|
100
|
|
|
|
|
RETVALSV = RETVAL ? newRV_noinc((SV*)RETVAL) : &PL_sv_undef; |
|
516
|
2
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
517
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
518
|
|
|
|
|
|
|
} |
|
519
|
|
|
|
|
|
|
} |
|
520
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
521
|
2
|
50
|
|
|
|
|
}); } |
|
522
|
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
|
|
525
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_io_in) { xs::throw_guard(cv, [=]() |
|
526
|
|
|
|
|
|
|
{ |
|
527
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
528
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
529
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
530
|
|
|
|
|
|
|
{ |
|
531
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
532
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
IO* val; |
|
534
|
|
|
|
|
|
|
|
|
535
|
11
|
100
|
|
|
|
|
if (SvROK(ST(0)) && SvTYPE(SvRV(ST(0))) == SVt_PVIO) val = (IO*)SvRV(ST(0)); |
|
|
|
100
|
|
|
|
|
|
|
536
|
10
|
100
|
|
|
|
|
else if (SvROK(ST(0)) && SvTYPE(SvRV(ST(0))) == SVt_PVGV && (val = GvIO(SvRV(ST(0))))) {} |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
537
|
10
|
100
|
|
|
|
|
else if (SvOK(ST(0))) throw "MyTest::io_in() -- val is not an IO reference"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
else val = NULL |
|
539
|
1
|
|
|
|
|
|
; |
|
540
|
|
|
|
|
|
|
#line 29 "t/typemap/svrefs.xsi" |
|
541
|
|
|
|
|
|
|
RETVAL = (uint64_t)val; |
|
542
|
|
|
|
|
|
|
#line 543 "t/typemap/typemap_xsgen.cc" |
|
543
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
} |
|
545
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
546
|
11
|
50
|
|
|
|
|
}); } |
|
547
|
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
|
|
550
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_cv_out) { xs::throw_guard(cv, [=]() |
|
551
|
|
|
|
|
|
|
{ |
|
552
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
553
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
554
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "not_null= false"); |
|
555
|
|
|
|
|
|
|
{ |
|
556
|
|
|
|
|
|
|
CV * RETVAL; |
|
557
|
|
|
|
|
|
|
bool not_null; |
|
558
|
|
|
|
|
|
|
|
|
559
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
560
|
1
|
|
|
|
|
|
not_null = false; |
|
561
|
|
|
|
|
|
|
else { |
|
562
|
1
|
50
|
|
|
|
|
not_null = (bool)SvTRUE(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
563
|
1
|
|
|
|
|
|
; |
|
564
|
|
|
|
|
|
|
} |
|
565
|
|
|
|
|
|
|
#line 33 "t/typemap/svrefs.xsi" |
|
566
|
|
|
|
|
|
|
RETVAL = not_null ? cv : NULL; |
|
567
|
|
|
|
|
|
|
#line 568 "t/typemap/typemap_xsgen.cc" |
|
568
|
|
|
|
|
|
|
{ |
|
569
|
|
|
|
|
|
|
SV * RETVALSV; |
|
570
|
2
|
100
|
|
|
|
|
RETVALSV = RETVAL ? newRV_noinc((SV*)RETVAL) : &PL_sv_undef; |
|
571
|
2
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
572
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
573
|
|
|
|
|
|
|
} |
|
574
|
|
|
|
|
|
|
} |
|
575
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
576
|
2
|
50
|
|
|
|
|
}); } |
|
577
|
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
|
|
580
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_cv_in) { xs::throw_guard(cv, [=]() |
|
581
|
|
|
|
|
|
|
{ |
|
582
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
583
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
584
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
585
|
|
|
|
|
|
|
{ |
|
586
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
587
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
588
|
|
|
|
|
|
|
CV* val; |
|
589
|
|
|
|
|
|
|
|
|
590
|
11
|
100
|
|
|
|
|
if (SvROK(ST(0)) && SvTYPE(SvRV(ST(0))) == SVt_PVCV) val = (CV*)SvRV(ST(0)); |
|
|
|
100
|
|
|
|
|
|
|
591
|
10
|
100
|
|
|
|
|
else if (SvOK(ST(0))) throw "MyTest::cv_in() -- val is not a CODE reference"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
else val = NULL |
|
593
|
1
|
|
|
|
|
|
; |
|
594
|
|
|
|
|
|
|
#line 37 "t/typemap/svrefs.xsi" |
|
595
|
|
|
|
|
|
|
RETVAL = (uint64_t)val; |
|
596
|
|
|
|
|
|
|
#line 597 "t/typemap/typemap_xsgen.cc" |
|
597
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
} |
|
599
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
600
|
11
|
50
|
|
|
|
|
}); } |
|
601
|
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
|
|
604
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_gv_out) { xs::throw_guard(cv, [=]() |
|
605
|
|
|
|
|
|
|
{ |
|
606
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
607
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
608
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "not_null= false"); |
|
609
|
|
|
|
|
|
|
{ |
|
610
|
|
|
|
|
|
|
GV * RETVAL; |
|
611
|
|
|
|
|
|
|
bool not_null; |
|
612
|
|
|
|
|
|
|
|
|
613
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
614
|
1
|
|
|
|
|
|
not_null = false; |
|
615
|
|
|
|
|
|
|
else { |
|
616
|
1
|
50
|
|
|
|
|
not_null = (bool)SvTRUE(ST(0)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
617
|
1
|
|
|
|
|
|
; |
|
618
|
|
|
|
|
|
|
} |
|
619
|
|
|
|
|
|
|
#line 41 "t/typemap/svrefs.xsi" |
|
620
|
|
|
|
|
|
|
RETVAL = not_null ? CvGV(cv) : NULL; |
|
621
|
|
|
|
|
|
|
#line 622 "t/typemap/typemap_xsgen.cc" |
|
622
|
|
|
|
|
|
|
{ |
|
623
|
|
|
|
|
|
|
SV * RETVALSV; |
|
624
|
2
|
100
|
|
|
|
|
RETVALSV = RETVAL ? (SV*)RETVAL : &PL_sv_undef; |
|
625
|
2
|
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
626
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
627
|
|
|
|
|
|
|
} |
|
628
|
|
|
|
|
|
|
} |
|
629
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
630
|
2
|
50
|
|
|
|
|
}); } |
|
631
|
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
|
|
634
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_gv_in) { xs::throw_guard(cv, [=]() |
|
635
|
|
|
|
|
|
|
{ |
|
636
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
637
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
638
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
639
|
|
|
|
|
|
|
{ |
|
640
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
641
|
11
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
GV* val; |
|
643
|
|
|
|
|
|
|
|
|
644
|
11
|
100
|
|
|
|
|
if (SvTYPE(ST(0)) == SVt_PVGV) val = (GV*)ST(0); |
|
645
|
10
|
100
|
|
|
|
|
else if (SvOK(ST(0))) throw "MyTest::gv_in() -- val is not a GLOB"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
else val = NULL |
|
647
|
1
|
|
|
|
|
|
; |
|
648
|
|
|
|
|
|
|
#line 45 "t/typemap/svrefs.xsi" |
|
649
|
|
|
|
|
|
|
RETVAL = (uint64_t)val; |
|
650
|
|
|
|
|
|
|
#line 651 "t/typemap/typemap_xsgen.cc" |
|
651
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
652
|
|
|
|
|
|
|
} |
|
653
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
654
|
11
|
50
|
|
|
|
|
}); } |
|
655
|
|
|
|
|
|
|
|
|
656
|
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'svrefs.xsi' */ |
|
658
|
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
|
|
660
|
|
|
|
|
|
|
/* INCLUDE: Including 'const.xsi' from 'typemap.xs' */ |
|
661
|
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
template |
|
663
|
|
|
|
|
|
|
struct _MyConst { |
|
664
|
|
|
|
|
|
|
int val; |
|
665
|
5
|
|
|
|
|
|
_MyConst (int arg) : val(arg) {} |
|
666
|
12
|
|
|
|
|
|
int get_val () const { return val; } |
|
667
|
0
|
|
|
|
|
|
virtual _MyConst* clone () const { return new _MyConst(val); } |
|
668
|
20
|
50
|
|
|
|
|
virtual ~_MyConst () { dcnt.c++; } |
|
|
|
50
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
}; |
|
670
|
|
|
|
|
|
|
using MyConst = _MyConst<0>; |
|
671
|
|
|
|
|
|
|
using MyConst2 = _MyConst<1>; |
|
672
|
|
|
|
|
|
|
namespace xs { |
|
673
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
674
|
4
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyConst"; } |
|
|
|
50
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
}; |
|
676
|
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
678
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyConst2"; } |
|
679
|
1
|
|
|
|
|
|
static Sv out (TYPE var, const Sv& proto = {}) { |
|
680
|
1
|
|
|
|
|
|
var->val = 555; |
|
681
|
1
|
|
|
|
|
|
return TypemapObject::out(var, proto); |
|
682
|
|
|
|
|
|
|
} |
|
683
|
|
|
|
|
|
|
}; |
|
684
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
685
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyConst2"; } |
|
686
|
|
|
|
|
|
|
}; |
|
687
|
|
|
|
|
|
|
} |
|
688
|
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
|
|
690
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_new) { xs::throw_guard(cv, [=]() |
|
691
|
|
|
|
|
|
|
{ |
|
692
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
693
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
694
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
695
|
|
|
|
|
|
|
{ |
|
696
|
|
|
|
|
|
|
MyConst * RETVAL; |
|
697
|
1
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
; |
|
699
|
|
|
|
|
|
|
#line 36 "t/typemap/const.xsi" |
|
700
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
701
|
|
|
|
|
|
|
RETVAL = new MyConst(arg); |
|
702
|
|
|
|
|
|
|
#line 703 "t/typemap/typemap_xsgen.cc" |
|
703
|
|
|
|
|
|
|
{ |
|
704
|
|
|
|
|
|
|
SV * RETVALSV; |
|
705
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
706
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
707
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
708
|
|
|
|
|
|
|
} |
|
709
|
|
|
|
|
|
|
} |
|
710
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
711
|
1
|
50
|
|
|
|
|
}); } |
|
712
|
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
|
|
715
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_new_const) { xs::throw_guard(cv, [=]() |
|
716
|
|
|
|
|
|
|
{ |
|
717
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
718
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
719
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
720
|
|
|
|
|
|
|
{ |
|
721
|
|
|
|
|
|
|
const MyConst * RETVAL; |
|
722
|
2
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
; |
|
724
|
|
|
|
|
|
|
#line 39 "t/typemap/const.xsi" |
|
725
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
726
|
|
|
|
|
|
|
RETVAL = new MyConst(arg); |
|
727
|
|
|
|
|
|
|
#line 728 "t/typemap/typemap_xsgen.cc" |
|
728
|
|
|
|
|
|
|
{ |
|
729
|
|
|
|
|
|
|
SV * RETVALSV; |
|
730
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
731
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
732
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
733
|
|
|
|
|
|
|
} |
|
734
|
|
|
|
|
|
|
} |
|
735
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
736
|
2
|
50
|
|
|
|
|
}); } |
|
737
|
|
|
|
|
|
|
|
|
738
|
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
|
|
740
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_get_val) { xs::throw_guard(cv, [=]() |
|
741
|
|
|
|
|
|
|
{ |
|
742
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
743
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
744
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
745
|
|
|
|
|
|
|
{ |
|
746
|
|
|
|
|
|
|
int RETVAL; |
|
747
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
748
|
6
|
50
|
|
|
|
|
const MyConst* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
; |
|
750
|
|
|
|
|
|
|
#line 42 "t/typemap/const.xsi" |
|
751
|
|
|
|
|
|
|
RETVAL = THIS->get_val(); |
|
752
|
|
|
|
|
|
|
#line 753 "t/typemap/typemap_xsgen.cc" |
|
753
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
} |
|
755
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
756
|
6
|
50
|
|
|
|
|
}); } |
|
757
|
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
|
|
760
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_set_val) { xs::throw_guard(cv, [=]() |
|
761
|
|
|
|
|
|
|
{ |
|
762
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
763
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
764
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval"); |
|
765
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
766
|
3
|
|
|
|
|
|
SP -= items; |
|
767
|
|
|
|
|
|
|
{ |
|
768
|
3
|
100
|
|
|
|
|
MyConst* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
; |
|
770
|
2
|
|
|
|
|
|
SV* newval = ST(1) |
|
771
|
|
|
|
|
|
|
; |
|
772
|
|
|
|
|
|
|
#line 44 "t/typemap/const.xsi" |
|
773
|
|
|
|
|
|
|
THIS->val = SvIV(newval); |
|
774
|
|
|
|
|
|
|
#line 775 "t/typemap/typemap_xsgen.cc" |
|
775
|
2
|
|
|
|
|
|
PUTBACK; |
|
776
|
2
|
|
|
|
|
|
return; |
|
777
|
|
|
|
|
|
|
} |
|
778
|
3
|
50
|
|
|
|
|
}); } |
|
779
|
|
|
|
|
|
|
|
|
780
|
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
|
|
782
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_set_from) { xs::throw_guard(cv, [=]() |
|
783
|
|
|
|
|
|
|
{ |
|
784
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
785
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
786
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
787
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
788
|
1
|
|
|
|
|
|
SP -= items; |
|
789
|
|
|
|
|
|
|
{ |
|
790
|
1
|
50
|
|
|
|
|
MyConst* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
; |
|
792
|
1
|
|
|
|
|
|
const MyConst* other = xs::in(ST(1)); |
|
793
|
|
|
|
|
|
|
; |
|
794
|
|
|
|
|
|
|
#line 46 "t/typemap/const.xsi" |
|
795
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
796
|
|
|
|
|
|
|
#line 797 "t/typemap/typemap_xsgen.cc" |
|
797
|
1
|
|
|
|
|
|
PUTBACK; |
|
798
|
1
|
|
|
|
|
|
return; |
|
799
|
|
|
|
|
|
|
} |
|
800
|
1
|
50
|
|
|
|
|
}); } |
|
801
|
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
|
|
804
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst_DESTROY) { xs::throw_guard(cv, [=]() |
|
805
|
|
|
|
|
|
|
{ |
|
806
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
807
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
808
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
809
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
810
|
3
|
|
|
|
|
|
SP -= items; |
|
811
|
|
|
|
|
|
|
{ |
|
812
|
3
|
50
|
|
|
|
|
const MyConst* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
; |
|
814
|
|
|
|
|
|
|
#line 49 "t/typemap/const.xsi" |
|
815
|
|
|
|
|
|
|
dcnt.perl++; |
|
816
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
817
|
|
|
|
|
|
|
#line 818 "t/typemap/typemap_xsgen.cc" |
|
818
|
3
|
|
|
|
|
|
PUTBACK; |
|
819
|
3
|
|
|
|
|
|
return; |
|
820
|
|
|
|
|
|
|
} |
|
821
|
3
|
50
|
|
|
|
|
}); } |
|
822
|
|
|
|
|
|
|
|
|
823
|
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
|
|
825
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_new) { xs::throw_guard(cv, [=]() |
|
826
|
|
|
|
|
|
|
{ |
|
827
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
828
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
829
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
830
|
|
|
|
|
|
|
{ |
|
831
|
|
|
|
|
|
|
MyConst2 * RETVAL; |
|
832
|
1
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
; |
|
834
|
|
|
|
|
|
|
#line 56 "t/typemap/const.xsi" |
|
835
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
836
|
|
|
|
|
|
|
RETVAL = new MyConst2(arg); |
|
837
|
|
|
|
|
|
|
#line 838 "t/typemap/typemap_xsgen.cc" |
|
838
|
|
|
|
|
|
|
{ |
|
839
|
|
|
|
|
|
|
SV * RETVALSV; |
|
840
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
841
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
842
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
843
|
|
|
|
|
|
|
} |
|
844
|
|
|
|
|
|
|
} |
|
845
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
846
|
1
|
50
|
|
|
|
|
}); } |
|
847
|
|
|
|
|
|
|
|
|
848
|
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
|
|
850
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_new_const) { xs::throw_guard(cv, [=]() |
|
851
|
|
|
|
|
|
|
{ |
|
852
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
853
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
854
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
855
|
|
|
|
|
|
|
{ |
|
856
|
|
|
|
|
|
|
const MyConst2 * RETVAL; |
|
857
|
1
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
; |
|
859
|
|
|
|
|
|
|
#line 59 "t/typemap/const.xsi" |
|
860
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
861
|
|
|
|
|
|
|
RETVAL = new MyConst2(arg); |
|
862
|
|
|
|
|
|
|
#line 863 "t/typemap/typemap_xsgen.cc" |
|
863
|
|
|
|
|
|
|
{ |
|
864
|
|
|
|
|
|
|
SV * RETVALSV; |
|
865
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
866
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
867
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
868
|
|
|
|
|
|
|
} |
|
869
|
|
|
|
|
|
|
} |
|
870
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
871
|
1
|
50
|
|
|
|
|
}); } |
|
872
|
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
|
|
875
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_get_val) { xs::throw_guard(cv, [=]() |
|
876
|
|
|
|
|
|
|
{ |
|
877
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
878
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
879
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
880
|
|
|
|
|
|
|
{ |
|
881
|
|
|
|
|
|
|
int RETVAL; |
|
882
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
883
|
2
|
50
|
|
|
|
|
const MyConst2* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
884
|
|
|
|
|
|
|
; |
|
885
|
|
|
|
|
|
|
#line 63 "t/typemap/const.xsi" |
|
886
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
887
|
|
|
|
|
|
|
#line 888 "t/typemap/typemap_xsgen.cc" |
|
888
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
} |
|
890
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
891
|
2
|
50
|
|
|
|
|
}); } |
|
892
|
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
|
|
895
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_set_val) { xs::throw_guard(cv, [=]() |
|
896
|
|
|
|
|
|
|
{ |
|
897
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
898
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
899
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval"); |
|
900
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
901
|
0
|
|
|
|
|
|
SP -= items; |
|
902
|
|
|
|
|
|
|
{ |
|
903
|
0
|
0
|
|
|
|
|
MyConst2* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
; |
|
905
|
0
|
|
|
|
|
|
SV* newval = ST(1) |
|
906
|
|
|
|
|
|
|
; |
|
907
|
|
|
|
|
|
|
#line 67 "t/typemap/const.xsi" |
|
908
|
|
|
|
|
|
|
THIS->val = SvIV(newval); |
|
909
|
|
|
|
|
|
|
#line 910 "t/typemap/typemap_xsgen.cc" |
|
910
|
0
|
|
|
|
|
|
PUTBACK; |
|
911
|
0
|
|
|
|
|
|
return; |
|
912
|
|
|
|
|
|
|
} |
|
913
|
0
|
0
|
|
|
|
|
}); } |
|
914
|
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
|
|
917
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_set_from) { xs::throw_guard(cv, [=]() |
|
918
|
|
|
|
|
|
|
{ |
|
919
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
920
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
921
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
922
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
923
|
0
|
|
|
|
|
|
SP -= items; |
|
924
|
|
|
|
|
|
|
{ |
|
925
|
0
|
0
|
|
|
|
|
MyConst2* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
; |
|
927
|
0
|
|
|
|
|
|
const MyConst2* other = xs::in(ST(1)); |
|
928
|
|
|
|
|
|
|
; |
|
929
|
|
|
|
|
|
|
#line 71 "t/typemap/const.xsi" |
|
930
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
931
|
|
|
|
|
|
|
#line 932 "t/typemap/typemap_xsgen.cc" |
|
932
|
0
|
|
|
|
|
|
PUTBACK; |
|
933
|
0
|
|
|
|
|
|
return; |
|
934
|
|
|
|
|
|
|
} |
|
935
|
0
|
0
|
|
|
|
|
}); } |
|
936
|
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
|
|
939
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyConst2_DESTROY) { xs::throw_guard(cv, [=]() |
|
940
|
|
|
|
|
|
|
{ |
|
941
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
942
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
943
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
944
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
945
|
2
|
|
|
|
|
|
SP -= items; |
|
946
|
|
|
|
|
|
|
{ |
|
947
|
2
|
50
|
|
|
|
|
const MyConst2* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
; |
|
949
|
|
|
|
|
|
|
#line 75 "t/typemap/const.xsi" |
|
950
|
|
|
|
|
|
|
dcnt.perl++; |
|
951
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
952
|
|
|
|
|
|
|
#line 953 "t/typemap/typemap_xsgen.cc" |
|
953
|
2
|
|
|
|
|
|
PUTBACK; |
|
954
|
2
|
|
|
|
|
|
return; |
|
955
|
|
|
|
|
|
|
} |
|
956
|
2
|
50
|
|
|
|
|
}); } |
|
957
|
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
|
|
959
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'const.xsi' */ |
|
960
|
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
/* INCLUDE: Including 'container.xsi' from 'typemap.xs' */ |
|
963
|
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
#include |
|
965
|
|
|
|
|
|
|
#include |
|
966
|
|
|
|
|
|
|
using MapStringInt = std::map; |
|
967
|
|
|
|
|
|
|
using MapIntBool = std::map; |
|
968
|
|
|
|
|
|
|
|
|
969
|
|
|
|
|
|
|
|
|
970
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Container_std_vector_int) { xs::throw_guard(cv, [=]() |
|
971
|
|
|
|
|
|
|
{ |
|
972
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
973
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
974
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
975
|
|
|
|
|
|
|
{ |
|
976
|
2
|
|
|
|
|
|
std::vector RETVAL; |
|
977
|
2
|
50
|
|
|
|
|
std::vector val = xs::in>(ST(0)); |
|
978
|
|
|
|
|
|
|
; |
|
979
|
|
|
|
|
|
|
#line 12 "t/typemap/container.xsi" |
|
980
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
981
|
|
|
|
|
|
|
RETVAL = val; |
|
982
|
|
|
|
|
|
|
#line 983 "t/typemap/typemap_xsgen.cc" |
|
983
|
|
|
|
|
|
|
{ |
|
984
|
|
|
|
|
|
|
SV * RETVALSV; |
|
985
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
986
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
987
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
988
|
|
|
|
|
|
|
} |
|
989
|
|
|
|
|
|
|
} |
|
990
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
991
|
1
|
50
|
|
|
|
|
}); } |
|
992
|
|
|
|
|
|
|
|
|
993
|
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
|
|
995
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Container_std_map_string_int) { xs::throw_guard(cv, [=]() |
|
996
|
|
|
|
|
|
|
{ |
|
997
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
998
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
999
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1000
|
|
|
|
|
|
|
{ |
|
1001
|
2
|
|
|
|
|
|
MapStringInt RETVAL; |
|
1002
|
2
|
50
|
|
|
|
|
MapStringInt val = xs::in(ST(0)); |
|
1003
|
|
|
|
|
|
|
; |
|
1004
|
|
|
|
|
|
|
#line 16 "t/typemap/container.xsi" |
|
1005
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1006
|
|
|
|
|
|
|
RETVAL = val; |
|
1007
|
|
|
|
|
|
|
#line 1008 "t/typemap/typemap_xsgen.cc" |
|
1008
|
|
|
|
|
|
|
{ |
|
1009
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1010
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1011
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1012
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1013
|
|
|
|
|
|
|
} |
|
1014
|
|
|
|
|
|
|
} |
|
1015
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1016
|
1
|
50
|
|
|
|
|
}); } |
|
1017
|
|
|
|
|
|
|
|
|
1018
|
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
|
|
1020
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Container_std_map_int_bool) { xs::throw_guard(cv, [=]() |
|
1021
|
|
|
|
|
|
|
{ |
|
1022
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1023
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1024
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1025
|
|
|
|
|
|
|
{ |
|
1026
|
2
|
|
|
|
|
|
MapIntBool RETVAL; |
|
1027
|
2
|
50
|
|
|
|
|
MapIntBool val = xs::in(ST(0)); |
|
1028
|
|
|
|
|
|
|
; |
|
1029
|
|
|
|
|
|
|
#line 20 "t/typemap/container.xsi" |
|
1030
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1031
|
|
|
|
|
|
|
RETVAL = val; |
|
1032
|
|
|
|
|
|
|
#line 1033 "t/typemap/typemap_xsgen.cc" |
|
1033
|
|
|
|
|
|
|
{ |
|
1034
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1035
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1036
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1037
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1038
|
|
|
|
|
|
|
} |
|
1039
|
|
|
|
|
|
|
} |
|
1040
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1041
|
1
|
50
|
|
|
|
|
}); } |
|
1042
|
|
|
|
|
|
|
|
|
1043
|
|
|
|
|
|
|
|
|
1044
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'container.xsi' */ |
|
1045
|
|
|
|
|
|
|
|
|
1046
|
|
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
/* INCLUDE: Including 'not_null.xsi' from 'typemap.xs' */ |
|
1048
|
|
|
|
|
|
|
|
|
1049
|
12
|
50
|
|
|
|
|
struct TestNN : panda::Refcnt { |
|
1050
|
|
|
|
|
|
|
int val; |
|
1051
|
6
|
|
|
|
|
|
TestNN (int val) : val(val) {} |
|
1052
|
|
|
|
|
|
|
}; |
|
1053
|
|
|
|
|
|
|
using TestNNi = panda::iptr; |
|
1054
|
|
|
|
|
|
|
namespace xs { |
|
1055
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject {}; |
|
1056
|
|
|
|
|
|
|
} |
|
1057
|
|
|
|
|
|
|
|
|
1058
|
|
|
|
|
|
|
|
|
1059
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__NotNull_new) { xs::throw_guard(cv, [=]() |
|
1060
|
|
|
|
|
|
|
{ |
|
1061
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1062
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
1063
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
1064
|
|
|
|
|
|
|
{ |
|
1065
|
|
|
|
|
|
|
TestNN * RETVAL; |
|
1066
|
3
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1067
|
|
|
|
|
|
|
; |
|
1068
|
3
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
; |
|
1070
|
|
|
|
|
|
|
#line 17 "t/typemap/not_null.xsi" |
|
1071
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1072
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1073
|
|
|
|
|
|
|
RETVAL = new TestNN(arg); |
|
1074
|
|
|
|
|
|
|
#line 1075 "t/typemap/typemap_xsgen.cc" |
|
1075
|
|
|
|
|
|
|
{ |
|
1076
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1077
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1078
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1079
|
3
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1080
|
|
|
|
|
|
|
} |
|
1081
|
|
|
|
|
|
|
} |
|
1082
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1083
|
3
|
50
|
|
|
|
|
}); } |
|
1084
|
|
|
|
|
|
|
|
|
1085
|
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
|
|
1087
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__NotNull_val) { xs::throw_guard(cv, [=]() |
|
1088
|
|
|
|
|
|
|
{ |
|
1089
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1090
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
1091
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1092
|
|
|
|
|
|
|
{ |
|
1093
|
|
|
|
|
|
|
int RETVAL; |
|
1094
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1095
|
2
|
50
|
|
|
|
|
TestNN* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1096
|
|
|
|
|
|
|
; |
|
1097
|
|
|
|
|
|
|
#line 21 "t/typemap/not_null.xsi" |
|
1098
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1099
|
|
|
|
|
|
|
#line 1100 "t/typemap/typemap_xsgen.cc" |
|
1100
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1101
|
|
|
|
|
|
|
} |
|
1102
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1103
|
2
|
50
|
|
|
|
|
}); } |
|
1104
|
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
|
|
1106
|
|
|
|
|
|
|
|
|
1107
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__NotNull_set_from) { xs::throw_guard(cv, [=]() |
|
1108
|
|
|
|
|
|
|
{ |
|
1109
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1110
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1111
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1112
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1113
|
2
|
|
|
|
|
|
SP -= items; |
|
1114
|
|
|
|
|
|
|
{ |
|
1115
|
2
|
50
|
|
|
|
|
TestNN* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1116
|
|
|
|
|
|
|
; |
|
1117
|
2
|
100
|
|
|
|
|
xs::nn other = xs::in>(ST(1)); |
|
1118
|
|
|
|
|
|
|
; |
|
1119
|
|
|
|
|
|
|
#line 25 "t/typemap/not_null.xsi" |
|
1120
|
|
|
|
|
|
|
THIS->val = (&*other)->val; |
|
1121
|
|
|
|
|
|
|
#line 1122 "t/typemap/typemap_xsgen.cc" |
|
1122
|
1
|
|
|
|
|
|
PUTBACK; |
|
1123
|
1
|
|
|
|
|
|
return; |
|
1124
|
|
|
|
|
|
|
} |
|
1125
|
2
|
50
|
|
|
|
|
}); } |
|
1126
|
|
|
|
|
|
|
|
|
1127
|
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
|
|
1129
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__NotNull_set_from2) { xs::throw_guard(cv, [=]() |
|
1130
|
|
|
|
|
|
|
{ |
|
1131
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1132
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1133
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
1134
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1135
|
2
|
|
|
|
|
|
SP -= items; |
|
1136
|
|
|
|
|
|
|
{ |
|
1137
|
2
|
50
|
|
|
|
|
TestNN* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1138
|
|
|
|
|
|
|
; |
|
1139
|
3
|
100
|
|
|
|
|
xs::nn other = xs::in>(ST(1)); |
|
|
|
50
|
|
|
|
|
|
|
1140
|
|
|
|
|
|
|
; |
|
1141
|
|
|
|
|
|
|
#line 29 "t/typemap/not_null.xsi" |
|
1142
|
|
|
|
|
|
|
THIS->val = other->val; |
|
1143
|
|
|
|
|
|
|
#line 1144 "t/typemap/typemap_xsgen.cc" |
|
1144
|
1
|
|
|
|
|
|
PUTBACK; |
|
1145
|
2
|
|
|
|
|
|
return; |
|
1146
|
|
|
|
|
|
|
} |
|
1147
|
2
|
50
|
|
|
|
|
}); } |
|
1148
|
|
|
|
|
|
|
|
|
1149
|
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
|
|
1151
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__NotNull_DESTROY) { xs::throw_guard(cv, [=]() |
|
1152
|
|
|
|
|
|
|
{ |
|
1153
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1154
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
1155
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1156
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1157
|
3
|
|
|
|
|
|
SP -= items; |
|
1158
|
|
|
|
|
|
|
{ |
|
1159
|
3
|
50
|
|
|
|
|
TestNN* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1160
|
|
|
|
|
|
|
; |
|
1161
|
|
|
|
|
|
|
#line 32 "t/typemap/not_null.xsi" |
|
1162
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1163
|
|
|
|
|
|
|
#line 1164 "t/typemap/typemap_xsgen.cc" |
|
1164
|
3
|
|
|
|
|
|
PUTBACK; |
|
1165
|
3
|
|
|
|
|
|
return; |
|
1166
|
|
|
|
|
|
|
} |
|
1167
|
3
|
50
|
|
|
|
|
}); } |
|
1168
|
|
|
|
|
|
|
|
|
1169
|
|
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'not_null.xsi' */ |
|
1171
|
|
|
|
|
|
|
|
|
1172
|
|
|
|
|
|
|
|
|
1173
|
|
|
|
|
|
|
/* INCLUDE: Including 'svapi.xsi' from 'typemap.xs' */ |
|
1174
|
|
|
|
|
|
|
|
|
1175
|
|
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
|
|
1177
|
34
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_sv_out) { xs::throw_guard(cv, [=]() |
|
1178
|
|
|
|
|
|
|
{ |
|
1179
|
17
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1180
|
17
|
50
|
|
|
|
|
if (items < 0 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
1181
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "retv= NULL, deref= false"); |
|
1182
|
|
|
|
|
|
|
{ |
|
1183
|
31
|
|
|
|
|
|
Sv RETVAL; |
|
1184
|
|
|
|
|
|
|
SV* retv; |
|
1185
|
|
|
|
|
|
|
bool deref; |
|
1186
|
|
|
|
|
|
|
|
|
1187
|
17
|
100
|
|
|
|
|
if (items < 1) |
|
1188
|
1
|
|
|
|
|
|
retv = NULL; |
|
1189
|
|
|
|
|
|
|
else { |
|
1190
|
16
|
|
|
|
|
|
retv = ST(0) |
|
1191
|
16
|
|
|
|
|
|
; |
|
1192
|
|
|
|
|
|
|
} |
|
1193
|
|
|
|
|
|
|
|
|
1194
|
17
|
100
|
|
|
|
|
if (items < 2) |
|
1195
|
15
|
|
|
|
|
|
deref = false; |
|
1196
|
|
|
|
|
|
|
else { |
|
1197
|
2
|
50
|
|
|
|
|
deref = (bool)SvTRUE(ST(1)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1198
|
2
|
|
|
|
|
|
; |
|
1199
|
|
|
|
|
|
|
} |
|
1200
|
|
|
|
|
|
|
#line 5 "t/typemap/svapi.xsi" |
|
1201
|
|
|
|
|
|
|
if (deref) retv = SvRV(retv); |
|
1202
|
|
|
|
|
|
|
RETVAL = retv; |
|
1203
|
|
|
|
|
|
|
#line 1204 "t/typemap/typemap_xsgen.cc" |
|
1204
|
|
|
|
|
|
|
{ |
|
1205
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1206
|
17
|
|
|
|
|
|
RETVALSV = NULL; |
|
1207
|
17
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1208
|
16
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
100
|
|
|
|
|
|
|
1209
|
2
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
1210
|
1
|
50
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
50
|
|
|
|
|
|
|
1211
|
1
|
50
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
50
|
|
|
|
|
|
|
1212
|
|
|
|
|
|
|
case SVt_PVCV: |
|
1213
|
|
|
|
|
|
|
case SVt_PVIO: |
|
1214
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1215
|
0
|
|
|
|
|
|
break; |
|
1216
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
1217
|
|
|
|
|
|
|
} |
|
1218
|
14
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1219
|
17
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1220
|
|
|
|
|
|
|
} |
|
1221
|
|
|
|
|
|
|
} |
|
1222
|
17
|
|
|
|
|
|
XSRETURN(1); |
|
1223
|
17
|
50
|
|
|
|
|
}); } |
|
1224
|
|
|
|
|
|
|
|
|
1225
|
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
|
|
1227
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_scalar_in) { xs::throw_guard(cv, [=]() |
|
1228
|
|
|
|
|
|
|
{ |
|
1229
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1230
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1231
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1232
|
|
|
|
|
|
|
{ |
|
1233
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1234
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1235
|
30
|
50
|
|
|
|
|
Scalar val = ST(0); |
|
1236
|
15
|
50
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Scalar' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1237
|
0
|
|
|
|
|
|
; |
|
1238
|
|
|
|
|
|
|
#line 10 "t/typemap/svapi.xsi" |
|
1239
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1240
|
|
|
|
|
|
|
#line 1241 "t/typemap/typemap_xsgen.cc" |
|
1241
|
15
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1242
|
|
|
|
|
|
|
} |
|
1243
|
15
|
|
|
|
|
|
XSRETURN(1); |
|
1244
|
15
|
50
|
|
|
|
|
}); } |
|
1245
|
|
|
|
|
|
|
|
|
1246
|
|
|
|
|
|
|
|
|
1247
|
|
|
|
|
|
|
|
|
1248
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_scalar_out) { xs::throw_guard(cv, [=]() |
|
1249
|
|
|
|
|
|
|
{ |
|
1250
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1251
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1252
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1253
|
|
|
|
|
|
|
{ |
|
1254
|
3
|
|
|
|
|
|
Scalar RETVAL; |
|
1255
|
|
|
|
|
|
|
SV* val; |
|
1256
|
|
|
|
|
|
|
|
|
1257
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1258
|
1
|
|
|
|
|
|
val = NULL; |
|
1259
|
|
|
|
|
|
|
else { |
|
1260
|
1
|
|
|
|
|
|
val = ST(0) |
|
1261
|
1
|
|
|
|
|
|
; |
|
1262
|
|
|
|
|
|
|
} |
|
1263
|
|
|
|
|
|
|
#line 14 "t/typemap/svapi.xsi" |
|
1264
|
|
|
|
|
|
|
RETVAL = val; |
|
1265
|
|
|
|
|
|
|
#line 1266 "t/typemap/typemap_xsgen.cc" |
|
1266
|
|
|
|
|
|
|
{ |
|
1267
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1268
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1269
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1270
|
1
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
|
1271
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1272
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1273
|
|
|
|
|
|
|
} |
|
1274
|
|
|
|
|
|
|
} |
|
1275
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1276
|
2
|
50
|
|
|
|
|
}); } |
|
1277
|
|
|
|
|
|
|
|
|
1278
|
|
|
|
|
|
|
|
|
1279
|
|
|
|
|
|
|
|
|
1280
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_simple_in) { xs::throw_guard(cv, [=]() |
|
1281
|
|
|
|
|
|
|
{ |
|
1282
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1283
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1284
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1285
|
|
|
|
|
|
|
{ |
|
1286
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1287
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1288
|
20
|
100
|
|
|
|
|
Simple val = ST(0); |
|
1289
|
5
|
50
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Simple' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1290
|
0
|
|
|
|
|
|
; |
|
1291
|
|
|
|
|
|
|
#line 18 "t/typemap/svapi.xsi" |
|
1292
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1293
|
|
|
|
|
|
|
#line 1294 "t/typemap/typemap_xsgen.cc" |
|
1294
|
5
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1295
|
|
|
|
|
|
|
} |
|
1296
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
1297
|
15
|
50
|
|
|
|
|
}); } |
|
1298
|
|
|
|
|
|
|
|
|
1299
|
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
|
|
1301
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_simple_out) { xs::throw_guard(cv, [=]() |
|
1302
|
|
|
|
|
|
|
{ |
|
1303
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1304
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1305
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1306
|
|
|
|
|
|
|
{ |
|
1307
|
3
|
|
|
|
|
|
Simple RETVAL; |
|
1308
|
|
|
|
|
|
|
SV* val; |
|
1309
|
|
|
|
|
|
|
|
|
1310
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1311
|
1
|
|
|
|
|
|
val = NULL; |
|
1312
|
|
|
|
|
|
|
else { |
|
1313
|
1
|
|
|
|
|
|
val = ST(0) |
|
1314
|
1
|
|
|
|
|
|
; |
|
1315
|
|
|
|
|
|
|
} |
|
1316
|
|
|
|
|
|
|
#line 22 "t/typemap/svapi.xsi" |
|
1317
|
|
|
|
|
|
|
RETVAL = val; |
|
1318
|
|
|
|
|
|
|
#line 1319 "t/typemap/typemap_xsgen.cc" |
|
1319
|
|
|
|
|
|
|
{ |
|
1320
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1321
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1322
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1323
|
1
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
|
1324
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1325
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1326
|
|
|
|
|
|
|
} |
|
1327
|
|
|
|
|
|
|
} |
|
1328
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1329
|
2
|
50
|
|
|
|
|
}); } |
|
1330
|
|
|
|
|
|
|
|
|
1331
|
|
|
|
|
|
|
|
|
1332
|
|
|
|
|
|
|
|
|
1333
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_ref_in) { xs::throw_guard(cv, [=]() |
|
1334
|
|
|
|
|
|
|
{ |
|
1335
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1336
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1337
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1338
|
|
|
|
|
|
|
{ |
|
1339
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1340
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1341
|
25
|
100
|
|
|
|
|
Ref val = ST(0); |
|
1342
|
10
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1343
|
0
|
|
|
|
|
|
; |
|
1344
|
|
|
|
|
|
|
#line 26 "t/typemap/svapi.xsi" |
|
1345
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1346
|
|
|
|
|
|
|
#line 1347 "t/typemap/typemap_xsgen.cc" |
|
1347
|
10
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1348
|
|
|
|
|
|
|
} |
|
1349
|
10
|
|
|
|
|
|
XSRETURN(1); |
|
1350
|
15
|
50
|
|
|
|
|
}); } |
|
1351
|
|
|
|
|
|
|
|
|
1352
|
|
|
|
|
|
|
|
|
1353
|
|
|
|
|
|
|
|
|
1354
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_ref_out) { xs::throw_guard(cv, [=]() |
|
1355
|
|
|
|
|
|
|
{ |
|
1356
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1357
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1358
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1359
|
|
|
|
|
|
|
{ |
|
1360
|
3
|
|
|
|
|
|
Ref RETVAL; |
|
1361
|
|
|
|
|
|
|
SV* val; |
|
1362
|
|
|
|
|
|
|
|
|
1363
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1364
|
1
|
|
|
|
|
|
val = NULL; |
|
1365
|
|
|
|
|
|
|
else { |
|
1366
|
1
|
|
|
|
|
|
val = ST(0) |
|
1367
|
1
|
|
|
|
|
|
; |
|
1368
|
|
|
|
|
|
|
} |
|
1369
|
|
|
|
|
|
|
#line 30 "t/typemap/svapi.xsi" |
|
1370
|
|
|
|
|
|
|
RETVAL = val; |
|
1371
|
|
|
|
|
|
|
#line 1372 "t/typemap/typemap_xsgen.cc" |
|
1372
|
|
|
|
|
|
|
{ |
|
1373
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1374
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1375
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1376
|
1
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
|
1377
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1378
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1379
|
|
|
|
|
|
|
} |
|
1380
|
|
|
|
|
|
|
} |
|
1381
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1382
|
2
|
50
|
|
|
|
|
}); } |
|
1383
|
|
|
|
|
|
|
|
|
1384
|
|
|
|
|
|
|
|
|
1385
|
|
|
|
|
|
|
|
|
1386
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_glob_in) { xs::throw_guard(cv, [=]() |
|
1387
|
|
|
|
|
|
|
{ |
|
1388
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1389
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1390
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1391
|
|
|
|
|
|
|
{ |
|
1392
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1393
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1394
|
17
|
100
|
|
|
|
|
Glob val = ST(0); |
|
1395
|
2
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Glob' value" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1396
|
0
|
|
|
|
|
|
; |
|
1397
|
|
|
|
|
|
|
#line 34 "t/typemap/svapi.xsi" |
|
1398
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1399
|
|
|
|
|
|
|
#line 1400 "t/typemap/typemap_xsgen.cc" |
|
1400
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1401
|
|
|
|
|
|
|
} |
|
1402
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1403
|
15
|
50
|
|
|
|
|
}); } |
|
1404
|
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
|
|
1406
|
|
|
|
|
|
|
|
|
1407
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_glob_out) { xs::throw_guard(cv, [=]() |
|
1408
|
|
|
|
|
|
|
{ |
|
1409
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1410
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1411
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1412
|
|
|
|
|
|
|
{ |
|
1413
|
3
|
|
|
|
|
|
Glob RETVAL; |
|
1414
|
|
|
|
|
|
|
SV* val; |
|
1415
|
|
|
|
|
|
|
|
|
1416
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1417
|
1
|
|
|
|
|
|
val = NULL; |
|
1418
|
|
|
|
|
|
|
else { |
|
1419
|
1
|
|
|
|
|
|
val = ST(0) |
|
1420
|
1
|
|
|
|
|
|
; |
|
1421
|
|
|
|
|
|
|
} |
|
1422
|
|
|
|
|
|
|
#line 38 "t/typemap/svapi.xsi" |
|
1423
|
|
|
|
|
|
|
RETVAL = val; |
|
1424
|
|
|
|
|
|
|
#line 1425 "t/typemap/typemap_xsgen.cc" |
|
1425
|
|
|
|
|
|
|
{ |
|
1426
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1427
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1428
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1429
|
1
|
|
|
|
|
|
RETVALSV = RETVAL.detach(); |
|
1430
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1431
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1432
|
|
|
|
|
|
|
} |
|
1433
|
|
|
|
|
|
|
} |
|
1434
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1435
|
2
|
50
|
|
|
|
|
}); } |
|
1436
|
|
|
|
|
|
|
|
|
1437
|
|
|
|
|
|
|
|
|
1438
|
|
|
|
|
|
|
|
|
1439
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_sub_in) { xs::throw_guard(cv, [=]() |
|
1440
|
|
|
|
|
|
|
{ |
|
1441
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1442
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1443
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1444
|
|
|
|
|
|
|
{ |
|
1445
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1446
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1447
|
17
|
100
|
|
|
|
|
Sub val = ST(0); |
|
1448
|
2
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1449
|
0
|
|
|
|
|
|
; |
|
1450
|
|
|
|
|
|
|
#line 42 "t/typemap/svapi.xsi" |
|
1451
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1452
|
|
|
|
|
|
|
#line 1453 "t/typemap/typemap_xsgen.cc" |
|
1453
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1454
|
|
|
|
|
|
|
} |
|
1455
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1456
|
15
|
50
|
|
|
|
|
}); } |
|
1457
|
|
|
|
|
|
|
|
|
1458
|
|
|
|
|
|
|
|
|
1459
|
|
|
|
|
|
|
|
|
1460
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_sub_out) { xs::throw_guard(cv, [=]() |
|
1461
|
|
|
|
|
|
|
{ |
|
1462
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1463
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1464
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1465
|
|
|
|
|
|
|
{ |
|
1466
|
3
|
|
|
|
|
|
Sub RETVAL; |
|
1467
|
|
|
|
|
|
|
SV* val; |
|
1468
|
|
|
|
|
|
|
|
|
1469
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1470
|
1
|
|
|
|
|
|
val = NULL; |
|
1471
|
|
|
|
|
|
|
else { |
|
1472
|
1
|
|
|
|
|
|
val = ST(0) |
|
1473
|
1
|
|
|
|
|
|
; |
|
1474
|
|
|
|
|
|
|
} |
|
1475
|
|
|
|
|
|
|
#line 46 "t/typemap/svapi.xsi" |
|
1476
|
|
|
|
|
|
|
RETVAL = val; |
|
1477
|
|
|
|
|
|
|
#line 1478 "t/typemap/typemap_xsgen.cc" |
|
1478
|
|
|
|
|
|
|
{ |
|
1479
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1480
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1481
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1482
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1483
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1484
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1485
|
|
|
|
|
|
|
} |
|
1486
|
|
|
|
|
|
|
} |
|
1487
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1488
|
2
|
50
|
|
|
|
|
}); } |
|
1489
|
|
|
|
|
|
|
|
|
1490
|
|
|
|
|
|
|
|
|
1491
|
|
|
|
|
|
|
|
|
1492
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_array_in) { xs::throw_guard(cv, [=]() |
|
1493
|
|
|
|
|
|
|
{ |
|
1494
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1495
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1496
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1497
|
|
|
|
|
|
|
{ |
|
1498
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1499
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1500
|
18
|
100
|
|
|
|
|
Array val = ST(0); |
|
1501
|
3
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1502
|
0
|
|
|
|
|
|
; |
|
1503
|
|
|
|
|
|
|
#line 50 "t/typemap/svapi.xsi" |
|
1504
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1505
|
|
|
|
|
|
|
#line 1506 "t/typemap/typemap_xsgen.cc" |
|
1506
|
3
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1507
|
|
|
|
|
|
|
} |
|
1508
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1509
|
15
|
50
|
|
|
|
|
}); } |
|
1510
|
|
|
|
|
|
|
|
|
1511
|
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
|
|
1513
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_array_out) { xs::throw_guard(cv, [=]() |
|
1514
|
|
|
|
|
|
|
{ |
|
1515
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1516
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1517
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1518
|
|
|
|
|
|
|
{ |
|
1519
|
3
|
|
|
|
|
|
Array RETVAL; |
|
1520
|
|
|
|
|
|
|
SV* val; |
|
1521
|
|
|
|
|
|
|
|
|
1522
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1523
|
1
|
|
|
|
|
|
val = NULL; |
|
1524
|
|
|
|
|
|
|
else { |
|
1525
|
1
|
|
|
|
|
|
val = ST(0) |
|
1526
|
1
|
|
|
|
|
|
; |
|
1527
|
|
|
|
|
|
|
} |
|
1528
|
|
|
|
|
|
|
#line 54 "t/typemap/svapi.xsi" |
|
1529
|
|
|
|
|
|
|
RETVAL = val; |
|
1530
|
|
|
|
|
|
|
#line 1531 "t/typemap/typemap_xsgen.cc" |
|
1531
|
|
|
|
|
|
|
{ |
|
1532
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1533
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1534
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1535
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1536
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1537
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1538
|
|
|
|
|
|
|
} |
|
1539
|
|
|
|
|
|
|
} |
|
1540
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1541
|
2
|
50
|
|
|
|
|
}); } |
|
1542
|
|
|
|
|
|
|
|
|
1543
|
|
|
|
|
|
|
|
|
1544
|
|
|
|
|
|
|
|
|
1545
|
28
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_hash_in) { xs::throw_guard(cv, [=]() |
|
1546
|
|
|
|
|
|
|
{ |
|
1547
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1548
|
14
|
50
|
|
|
|
|
if (items != 1) |
|
1549
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1550
|
|
|
|
|
|
|
{ |
|
1551
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1552
|
14
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1553
|
18
|
100
|
|
|
|
|
Hash val = ST(0); |
|
1554
|
4
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Hash' reference" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1555
|
0
|
|
|
|
|
|
; |
|
1556
|
|
|
|
|
|
|
#line 58 "t/typemap/svapi.xsi" |
|
1557
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1558
|
|
|
|
|
|
|
#line 1559 "t/typemap/typemap_xsgen.cc" |
|
1559
|
4
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
} |
|
1561
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
1562
|
14
|
50
|
|
|
|
|
}); } |
|
1563
|
|
|
|
|
|
|
|
|
1564
|
|
|
|
|
|
|
|
|
1565
|
|
|
|
|
|
|
|
|
1566
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_hash_out) { xs::throw_guard(cv, [=]() |
|
1567
|
|
|
|
|
|
|
{ |
|
1568
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1569
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1570
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1571
|
|
|
|
|
|
|
{ |
|
1572
|
3
|
|
|
|
|
|
Hash RETVAL; |
|
1573
|
|
|
|
|
|
|
SV* val; |
|
1574
|
|
|
|
|
|
|
|
|
1575
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1576
|
1
|
|
|
|
|
|
val = NULL; |
|
1577
|
|
|
|
|
|
|
else { |
|
1578
|
1
|
|
|
|
|
|
val = ST(0) |
|
1579
|
1
|
|
|
|
|
|
; |
|
1580
|
|
|
|
|
|
|
} |
|
1581
|
|
|
|
|
|
|
#line 62 "t/typemap/svapi.xsi" |
|
1582
|
|
|
|
|
|
|
RETVAL = val; |
|
1583
|
|
|
|
|
|
|
#line 1584 "t/typemap/typemap_xsgen.cc" |
|
1584
|
|
|
|
|
|
|
{ |
|
1585
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1586
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1587
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1588
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1589
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1590
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1591
|
|
|
|
|
|
|
} |
|
1592
|
|
|
|
|
|
|
} |
|
1593
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1594
|
2
|
50
|
|
|
|
|
}); } |
|
1595
|
|
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
|
|
1597
|
|
|
|
|
|
|
|
|
1598
|
28
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_stash_in) { xs::throw_guard(cv, [=]() |
|
1599
|
|
|
|
|
|
|
{ |
|
1600
|
14
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1601
|
14
|
50
|
|
|
|
|
if (items != 1) |
|
1602
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1603
|
|
|
|
|
|
|
{ |
|
1604
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1605
|
14
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1606
|
16
|
100
|
|
|
|
|
Stash val = ST(0); |
|
1607
|
2
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a 'Stash' reference" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1608
|
0
|
|
|
|
|
|
; |
|
1609
|
|
|
|
|
|
|
#line 66 "t/typemap/svapi.xsi" |
|
1610
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1611
|
|
|
|
|
|
|
#line 1612 "t/typemap/typemap_xsgen.cc" |
|
1612
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1613
|
|
|
|
|
|
|
} |
|
1614
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1615
|
14
|
50
|
|
|
|
|
}); } |
|
1616
|
|
|
|
|
|
|
|
|
1617
|
|
|
|
|
|
|
|
|
1618
|
|
|
|
|
|
|
|
|
1619
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_stash_out) { xs::throw_guard(cv, [=]() |
|
1620
|
|
|
|
|
|
|
{ |
|
1621
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1622
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1623
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1624
|
|
|
|
|
|
|
{ |
|
1625
|
3
|
|
|
|
|
|
Stash RETVAL; |
|
1626
|
|
|
|
|
|
|
SV* val; |
|
1627
|
|
|
|
|
|
|
|
|
1628
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1629
|
1
|
|
|
|
|
|
val = NULL; |
|
1630
|
|
|
|
|
|
|
else { |
|
1631
|
1
|
|
|
|
|
|
val = ST(0) |
|
1632
|
1
|
|
|
|
|
|
; |
|
1633
|
|
|
|
|
|
|
} |
|
1634
|
|
|
|
|
|
|
#line 70 "t/typemap/svapi.xsi" |
|
1635
|
|
|
|
|
|
|
RETVAL = val; |
|
1636
|
|
|
|
|
|
|
#line 1637 "t/typemap/typemap_xsgen.cc" |
|
1637
|
|
|
|
|
|
|
{ |
|
1638
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1639
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1640
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1641
|
1
|
50
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1642
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1643
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1644
|
|
|
|
|
|
|
} |
|
1645
|
|
|
|
|
|
|
} |
|
1646
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1647
|
2
|
50
|
|
|
|
|
}); } |
|
1648
|
|
|
|
|
|
|
|
|
1649
|
|
|
|
|
|
|
|
|
1650
|
|
|
|
|
|
|
|
|
1651
|
30
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_object_in) { xs::throw_guard(cv, [=]() |
|
1652
|
|
|
|
|
|
|
{ |
|
1653
|
15
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1654
|
15
|
50
|
|
|
|
|
if (items != 1) |
|
1655
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val"); |
|
1656
|
|
|
|
|
|
|
{ |
|
1657
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1658
|
15
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1659
|
18
|
100
|
|
|
|
|
Object val = ST(0); |
|
1660
|
3
|
100
|
|
|
|
|
if (!val && SvOK(ST(0))) throw "arg is not a blessed reference" |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1661
|
0
|
|
|
|
|
|
; |
|
1662
|
|
|
|
|
|
|
#line 74 "t/typemap/svapi.xsi" |
|
1663
|
|
|
|
|
|
|
RETVAL = (uint64_t)val.get(); |
|
1664
|
|
|
|
|
|
|
#line 1665 "t/typemap/typemap_xsgen.cc" |
|
1665
|
3
|
100
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1666
|
|
|
|
|
|
|
} |
|
1667
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1668
|
15
|
50
|
|
|
|
|
}); } |
|
1669
|
|
|
|
|
|
|
|
|
1670
|
|
|
|
|
|
|
|
|
1671
|
|
|
|
|
|
|
|
|
1672
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__SvAPI_object_out) { xs::throw_guard(cv, [=]() |
|
1673
|
|
|
|
|
|
|
{ |
|
1674
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1675
|
2
|
50
|
|
|
|
|
if (items < 0 || items > 1) |
|
|
|
50
|
|
|
|
|
|
|
1676
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "val= NULL"); |
|
1677
|
|
|
|
|
|
|
{ |
|
1678
|
3
|
|
|
|
|
|
Object RETVAL; |
|
1679
|
|
|
|
|
|
|
SV* val; |
|
1680
|
|
|
|
|
|
|
|
|
1681
|
2
|
100
|
|
|
|
|
if (items < 1) |
|
1682
|
1
|
|
|
|
|
|
val = NULL; |
|
1683
|
|
|
|
|
|
|
else { |
|
1684
|
1
|
|
|
|
|
|
val = ST(0) |
|
1685
|
1
|
|
|
|
|
|
; |
|
1686
|
|
|
|
|
|
|
} |
|
1687
|
|
|
|
|
|
|
#line 78 "t/typemap/svapi.xsi" |
|
1688
|
|
|
|
|
|
|
RETVAL = val; |
|
1689
|
|
|
|
|
|
|
#line 1690 "t/typemap/typemap_xsgen.cc" |
|
1690
|
|
|
|
|
|
|
{ |
|
1691
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1692
|
2
|
|
|
|
|
|
RETVALSV = NULL; |
|
1693
|
2
|
100
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1694
|
1
|
50
|
|
|
|
|
RETVALSV = SvREFCNT_inc_NN(RETVAL.ref().get()); |
|
1695
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1696
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1697
|
|
|
|
|
|
|
} |
|
1698
|
|
|
|
|
|
|
} |
|
1699
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1700
|
2
|
50
|
|
|
|
|
}); } |
|
1701
|
|
|
|
|
|
|
|
|
1702
|
|
|
|
|
|
|
|
|
1703
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'svapi.xsi' */ |
|
1704
|
|
|
|
|
|
|
|
|
1705
|
|
|
|
|
|
|
|
|
1706
|
|
|
|
|
|
|
/* INCLUDE: Including 'function.xsi' from 'typemap.xs' */ |
|
1707
|
|
|
|
|
|
|
|
|
1708
|
|
|
|
|
|
|
#include |
|
1709
|
|
|
|
|
|
|
template |
|
1710
|
|
|
|
|
|
|
using function = panda::function; |
|
1711
|
|
|
|
|
|
|
using panda::string_view; |
|
1712
|
|
|
|
|
|
|
using vv_fn = function; |
|
1713
|
|
|
|
|
|
|
using vi_fn = function; |
|
1714
|
|
|
|
|
|
|
using iis_fn = function; |
|
1715
|
|
|
|
|
|
|
struct Data { |
|
1716
|
0
|
|
|
|
|
|
Data (int i) : i(i) {} |
|
1717
|
|
|
|
|
|
|
int i; |
|
1718
|
|
|
|
|
|
|
}; |
|
1719
|
|
|
|
|
|
|
|
|
1720
|
|
|
|
|
|
|
|
|
1721
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_vv) { xs::throw_guard(cv, [=]() |
|
1722
|
|
|
|
|
|
|
{ |
|
1723
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1724
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1725
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "fn"); |
|
1726
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1727
|
1
|
|
|
|
|
|
SP -= items; |
|
1728
|
|
|
|
|
|
|
{ |
|
1729
|
2
|
50
|
|
|
|
|
vv_fn fn = xs::in(ST(0)); |
|
1730
|
|
|
|
|
|
|
; |
|
1731
|
|
|
|
|
|
|
#line 21 "t/typemap/function.xsi" |
|
1732
|
|
|
|
|
|
|
fn(); |
|
1733
|
|
|
|
|
|
|
#line 1734 "t/typemap/typemap_xsgen.cc" |
|
1734
|
1
|
|
|
|
|
|
PUTBACK; |
|
1735
|
2
|
|
|
|
|
|
return; |
|
1736
|
|
|
|
|
|
|
} |
|
1737
|
1
|
50
|
|
|
|
|
}); } |
|
1738
|
|
|
|
|
|
|
|
|
1739
|
|
|
|
|
|
|
|
|
1740
|
|
|
|
|
|
|
|
|
1741
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_vi) { xs::throw_guard(cv, [=]() |
|
1742
|
|
|
|
|
|
|
{ |
|
1743
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1744
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1745
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "fn, val"); |
|
1746
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1747
|
1
|
|
|
|
|
|
SP -= items; |
|
1748
|
|
|
|
|
|
|
{ |
|
1749
|
2
|
50
|
|
|
|
|
vi_fn fn = xs::in(ST(0)); |
|
1750
|
|
|
|
|
|
|
; |
|
1751
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1752
|
|
|
|
|
|
|
; |
|
1753
|
|
|
|
|
|
|
#line 25 "t/typemap/function.xsi" |
|
1754
|
|
|
|
|
|
|
fn(val); |
|
1755
|
|
|
|
|
|
|
#line 1756 "t/typemap/typemap_xsgen.cc" |
|
1756
|
1
|
|
|
|
|
|
PUTBACK; |
|
1757
|
2
|
|
|
|
|
|
return; |
|
1758
|
|
|
|
|
|
|
} |
|
1759
|
1
|
50
|
|
|
|
|
}); } |
|
1760
|
|
|
|
|
|
|
|
|
1761
|
|
|
|
|
|
|
|
|
1762
|
|
|
|
|
|
|
|
|
1763
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_vi_custom) { xs::throw_guard(cv, [=]() |
|
1764
|
|
|
|
|
|
|
{ |
|
1765
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1766
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1767
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, val"); |
|
1768
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1769
|
1
|
|
|
|
|
|
SP -= items; |
|
1770
|
|
|
|
|
|
|
{ |
|
1771
|
2
|
50
|
|
|
|
|
Sub sub = ST(0); |
|
1772
|
1
|
50
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1773
|
0
|
|
|
|
|
|
; |
|
1774
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1775
|
|
|
|
|
|
|
; |
|
1776
|
|
|
|
|
|
|
#line 29 "t/typemap/function.xsi" |
|
1777
|
|
|
|
|
|
|
auto fn = xs::sub2function(sub, [](int val) { return Simple(val + 100); }); |
|
1778
|
|
|
|
|
|
|
fn(val); |
|
1779
|
|
|
|
|
|
|
#line 1780 "t/typemap/typemap_xsgen.cc" |
|
1780
|
1
|
|
|
|
|
|
PUTBACK; |
|
1781
|
2
|
|
|
|
|
|
return; |
|
1782
|
|
|
|
|
|
|
} |
|
1783
|
1
|
50
|
|
|
|
|
}); } |
|
1784
|
|
|
|
|
|
|
|
|
1785
|
|
|
|
|
|
|
|
|
1786
|
|
|
|
|
|
|
|
|
1787
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_iis) { xs::throw_guard(cv, [=]() |
|
1788
|
|
|
|
|
|
|
{ |
|
1789
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1790
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1791
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, i, d"); |
|
1792
|
|
|
|
|
|
|
{ |
|
1793
|
|
|
|
|
|
|
int RETVAL; |
|
1794
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1795
|
2
|
|
|
|
|
|
Sv sub = ST(0) |
|
1796
|
|
|
|
|
|
|
; |
|
1797
|
1
|
50
|
|
|
|
|
int i = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1798
|
|
|
|
|
|
|
; |
|
1799
|
1
|
|
|
|
|
|
string_view d; |
|
1800
|
|
|
|
|
|
|
|
|
1801
|
|
|
|
|
|
|
{ STRLEN __d_len; |
|
1802
|
1
|
50
|
|
|
|
|
const char* __d_buf = SvPV(ST(2), __d_len); |
|
|
|
0
|
|
|
|
|
|
|
1803
|
1
|
|
|
|
|
|
d = decltype(d)(__d_buf, __d_len); } |
|
1804
|
|
|
|
|
|
|
; |
|
1805
|
|
|
|
|
|
|
#line 34 "t/typemap/function.xsi" |
|
1806
|
|
|
|
|
|
|
auto fn = xs::sub2function(sub); |
|
1807
|
|
|
|
|
|
|
RETVAL = fn(i, d); |
|
1808
|
|
|
|
|
|
|
#line 1809 "t/typemap/typemap_xsgen.cc" |
|
1809
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1810
|
|
|
|
|
|
|
} |
|
1811
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1812
|
1
|
50
|
|
|
|
|
}); } |
|
1813
|
|
|
|
|
|
|
|
|
1814
|
|
|
|
|
|
|
|
|
1815
|
|
|
|
|
|
|
|
|
1816
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_iis_custom) { xs::throw_guard(cv, [=]() |
|
1817
|
|
|
|
|
|
|
{ |
|
1818
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1819
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1820
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, i, d"); |
|
1821
|
|
|
|
|
|
|
{ |
|
1822
|
|
|
|
|
|
|
int RETVAL; |
|
1823
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1824
|
2
|
50
|
|
|
|
|
Sub sub = ST(0); |
|
1825
|
1
|
50
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1826
|
0
|
|
|
|
|
|
; |
|
1827
|
1
|
50
|
|
|
|
|
int i = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1828
|
|
|
|
|
|
|
; |
|
1829
|
1
|
|
|
|
|
|
string_view d; |
|
1830
|
|
|
|
|
|
|
|
|
1831
|
|
|
|
|
|
|
{ STRLEN __d_len; |
|
1832
|
1
|
50
|
|
|
|
|
const char* __d_buf = SvPV(ST(2), __d_len); |
|
|
|
0
|
|
|
|
|
|
|
1833
|
1
|
|
|
|
|
|
d = decltype(d)(__d_buf, __d_len); } |
|
1834
|
|
|
|
|
|
|
; |
|
1835
|
|
|
|
|
|
|
#line 39 "t/typemap/function.xsi" |
|
1836
|
|
|
|
|
|
|
auto fn = xs::sub2function( |
|
1837
|
|
|
|
|
|
|
sub, |
|
1838
|
|
|
|
|
|
|
[=](const Sv& sv) { return SvIV(sv) + 10; }, |
|
1839
|
|
|
|
|
|
|
[](int val) { return Simple(val + 100); } |
|
1840
|
|
|
|
|
|
|
); |
|
1841
|
|
|
|
|
|
|
RETVAL = fn(i, d); |
|
1842
|
|
|
|
|
|
|
#line 1843 "t/typemap/typemap_xsgen.cc" |
|
1843
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1844
|
|
|
|
|
|
|
} |
|
1845
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1846
|
1
|
50
|
|
|
|
|
}); } |
|
1847
|
|
|
|
|
|
|
|
|
1848
|
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
|
|
1850
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f2s_vi) { xs::throw_guard(cv, [=]() |
|
1851
|
|
|
|
|
|
|
{ |
|
1852
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1853
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1854
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "fn"); |
|
1855
|
|
|
|
|
|
|
{ |
|
1856
|
2
|
50
|
|
|
|
|
vi_fn RETVAL; |
|
1857
|
2
|
50
|
|
|
|
|
vi_fn fn = xs::in(ST(0)); |
|
1858
|
|
|
|
|
|
|
; |
|
1859
|
|
|
|
|
|
|
#line 48 "t/typemap/function.xsi" |
|
1860
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1861
|
|
|
|
|
|
|
RETVAL = fn; |
|
1862
|
|
|
|
|
|
|
#line 1863 "t/typemap/typemap_xsgen.cc" |
|
1863
|
|
|
|
|
|
|
{ |
|
1864
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1865
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1866
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1867
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1868
|
|
|
|
|
|
|
} |
|
1869
|
|
|
|
|
|
|
} |
|
1870
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1871
|
1
|
50
|
|
|
|
|
}); } |
|
1872
|
|
|
|
|
|
|
|
|
1873
|
|
|
|
|
|
|
|
|
1874
|
|
|
|
|
|
|
|
|
1875
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_s2f_notm) { xs::throw_guard(cv, [=]() |
|
1876
|
|
|
|
|
|
|
{ |
|
1877
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1878
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1879
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, i"); |
|
1880
|
|
|
|
|
|
|
{ |
|
1881
|
|
|
|
|
|
|
int RETVAL; |
|
1882
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1883
|
2
|
50
|
|
|
|
|
Sub sub = ST(0); |
|
1884
|
1
|
50
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1885
|
0
|
|
|
|
|
|
; |
|
1886
|
1
|
50
|
|
|
|
|
int i = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1887
|
|
|
|
|
|
|
; |
|
1888
|
|
|
|
|
|
|
#line 52 "t/typemap/function.xsi" |
|
1889
|
|
|
|
|
|
|
auto fn = sub2function>( |
|
1890
|
|
|
|
|
|
|
sub, |
|
1891
|
|
|
|
|
|
|
[=](const Sv& sv) { return Data((int)Simple(sv) + 1); }, |
|
1892
|
|
|
|
|
|
|
[] (const Data& data) { return Simple(data.i + 2); } |
|
1893
|
|
|
|
|
|
|
); |
|
1894
|
|
|
|
|
|
|
Data arg(i); |
|
1895
|
|
|
|
|
|
|
auto ret = fn(arg); |
|
1896
|
|
|
|
|
|
|
RETVAL = ret.i; |
|
1897
|
|
|
|
|
|
|
#line 1898 "t/typemap/typemap_xsgen.cc" |
|
1898
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1899
|
|
|
|
|
|
|
} |
|
1900
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1901
|
1
|
50
|
|
|
|
|
}); } |
|
1902
|
|
|
|
|
|
|
|
|
1903
|
|
|
|
|
|
|
|
|
1904
|
|
|
|
|
|
|
|
|
1905
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_vv) { xs::throw_guard(cv, [=]() |
|
1906
|
|
|
|
|
|
|
{ |
|
1907
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1908
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1909
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, cnt"); |
|
1910
|
|
|
|
|
|
|
{ |
|
1911
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1912
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1913
|
0
|
0
|
|
|
|
|
Sub sub = ST(0); |
|
1914
|
0
|
0
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1915
|
0
|
|
|
|
|
|
; |
|
1916
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1917
|
|
|
|
|
|
|
; |
|
1918
|
|
|
|
|
|
|
#line 63 "t/typemap/function.xsi" |
|
1919
|
|
|
|
|
|
|
RETVAL = 0; |
|
1920
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
1921
|
|
|
|
|
|
|
RETVAL += (uint64_t)sub2function(sub).func.get(); |
|
1922
|
|
|
|
|
|
|
} |
|
1923
|
|
|
|
|
|
|
#line 1924 "t/typemap/typemap_xsgen.cc" |
|
1924
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1925
|
|
|
|
|
|
|
} |
|
1926
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1927
|
0
|
0
|
|
|
|
|
}); } |
|
1928
|
|
|
|
|
|
|
|
|
1929
|
|
|
|
|
|
|
|
|
1930
|
|
|
|
|
|
|
|
|
1931
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_vi) { xs::throw_guard(cv, [=]() |
|
1932
|
|
|
|
|
|
|
{ |
|
1933
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1934
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1935
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, cnt"); |
|
1936
|
|
|
|
|
|
|
{ |
|
1937
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1938
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1939
|
0
|
0
|
|
|
|
|
Sub sub = ST(0); |
|
1940
|
0
|
0
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1941
|
0
|
|
|
|
|
|
; |
|
1942
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1943
|
|
|
|
|
|
|
; |
|
1944
|
|
|
|
|
|
|
#line 70 "t/typemap/function.xsi" |
|
1945
|
|
|
|
|
|
|
RETVAL = 0; |
|
1946
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
1947
|
|
|
|
|
|
|
RETVAL += (uint64_t)sub2function(sub).func.get(); |
|
1948
|
|
|
|
|
|
|
} |
|
1949
|
|
|
|
|
|
|
#line 1950 "t/typemap/typemap_xsgen.cc" |
|
1950
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1951
|
|
|
|
|
|
|
} |
|
1952
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1953
|
0
|
0
|
|
|
|
|
}); } |
|
1954
|
|
|
|
|
|
|
|
|
1955
|
|
|
|
|
|
|
|
|
1956
|
|
|
|
|
|
|
|
|
1957
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_iis) { xs::throw_guard(cv, [=]() |
|
1958
|
|
|
|
|
|
|
{ |
|
1959
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1960
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1961
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sub, cnt"); |
|
1962
|
|
|
|
|
|
|
{ |
|
1963
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1964
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1965
|
0
|
0
|
|
|
|
|
Sub sub = ST(0); |
|
1966
|
0
|
0
|
|
|
|
|
if (!sub && SvOK(ST(0))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1967
|
0
|
|
|
|
|
|
; |
|
1968
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1969
|
|
|
|
|
|
|
; |
|
1970
|
|
|
|
|
|
|
#line 77 "t/typemap/function.xsi" |
|
1971
|
|
|
|
|
|
|
RETVAL = 0; |
|
1972
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
1973
|
|
|
|
|
|
|
RETVAL += (uint64_t)sub2function(sub).func.get(); |
|
1974
|
|
|
|
|
|
|
} |
|
1975
|
|
|
|
|
|
|
#line 1976 "t/typemap/typemap_xsgen.cc" |
|
1976
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1977
|
|
|
|
|
|
|
} |
|
1978
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
1979
|
0
|
0
|
|
|
|
|
}); } |
|
1980
|
|
|
|
|
|
|
|
|
1981
|
|
|
|
|
|
|
|
|
1982
|
|
|
|
|
|
|
|
|
1983
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_vvR) { xs::throw_guard(cv, [=]() |
|
1984
|
|
|
|
|
|
|
{ |
|
1985
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1986
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
1987
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "cnt"); |
|
1988
|
|
|
|
|
|
|
{ |
|
1989
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
1990
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1991
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
1992
|
|
|
|
|
|
|
; |
|
1993
|
|
|
|
|
|
|
#line 84 "t/typemap/function.xsi" |
|
1994
|
|
|
|
|
|
|
RETVAL = 0; |
|
1995
|
|
|
|
|
|
|
vv_fn fn = [](){}; |
|
1996
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
1997
|
|
|
|
|
|
|
RETVAL += (uint64_t)function2sub(fn).get(); |
|
1998
|
|
|
|
|
|
|
} |
|
1999
|
|
|
|
|
|
|
#line 2000 "t/typemap/typemap_xsgen.cc" |
|
2000
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2001
|
|
|
|
|
|
|
} |
|
2002
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2003
|
0
|
0
|
|
|
|
|
}); } |
|
2004
|
|
|
|
|
|
|
|
|
2005
|
|
|
|
|
|
|
|
|
2006
|
|
|
|
|
|
|
|
|
2007
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_viR) { xs::throw_guard(cv, [=]() |
|
2008
|
|
|
|
|
|
|
{ |
|
2009
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2010
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2011
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "cnt"); |
|
2012
|
|
|
|
|
|
|
{ |
|
2013
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
2014
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2015
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
2016
|
|
|
|
|
|
|
; |
|
2017
|
|
|
|
|
|
|
#line 92 "t/typemap/function.xsi" |
|
2018
|
|
|
|
|
|
|
RETVAL = 0; |
|
2019
|
|
|
|
|
|
|
vi_fn fn = [](int){}; |
|
2020
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
2021
|
|
|
|
|
|
|
RETVAL += (uint64_t)function2sub(fn).get(); |
|
2022
|
|
|
|
|
|
|
} |
|
2023
|
|
|
|
|
|
|
#line 2024 "t/typemap/typemap_xsgen.cc" |
|
2024
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2025
|
|
|
|
|
|
|
} |
|
2026
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2027
|
0
|
0
|
|
|
|
|
}); } |
|
2028
|
|
|
|
|
|
|
|
|
2029
|
|
|
|
|
|
|
|
|
2030
|
|
|
|
|
|
|
|
|
2031
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Function_bench_iisR) { xs::throw_guard(cv, [=]() |
|
2032
|
|
|
|
|
|
|
{ |
|
2033
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2034
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2035
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "cnt"); |
|
2036
|
|
|
|
|
|
|
{ |
|
2037
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
2038
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2039
|
0
|
0
|
|
|
|
|
int cnt = (int)SvIV(ST(0)) |
|
|
|
0
|
|
|
|
|
|
|
2040
|
|
|
|
|
|
|
; |
|
2041
|
|
|
|
|
|
|
#line 100 "t/typemap/function.xsi" |
|
2042
|
|
|
|
|
|
|
RETVAL = 0; |
|
2043
|
|
|
|
|
|
|
iis_fn fn = [](int a, string_view d) -> int { return a + d.length(); }; |
|
2044
|
|
|
|
|
|
|
for (int i = 0; i < cnt; ++i) { |
|
2045
|
|
|
|
|
|
|
RETVAL += (uint64_t)function2sub(fn).get(); |
|
2046
|
|
|
|
|
|
|
} |
|
2047
|
|
|
|
|
|
|
#line 2048 "t/typemap/typemap_xsgen.cc" |
|
2048
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2049
|
|
|
|
|
|
|
} |
|
2050
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2051
|
0
|
0
|
|
|
|
|
}); } |
|
2052
|
|
|
|
|
|
|
|
|
2053
|
|
|
|
|
|
|
|
|
2054
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'function.xsi' */ |
|
2055
|
|
|
|
|
|
|
|
|
2056
|
|
|
|
|
|
|
|
|
2057
|
|
|
|
|
|
|
/* INCLUDE: Including 'error.xsi' from 'typemap.xs' */ |
|
2058
|
|
|
|
|
|
|
|
|
2059
|
|
|
|
|
|
|
|
|
2060
|
|
|
|
|
|
|
|
|
2061
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Error_operation_canceled) { xs::throw_guard(cv, [=]() |
|
2062
|
|
|
|
|
|
|
{ |
|
2063
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2064
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
2065
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
2066
|
|
|
|
|
|
|
{ |
|
2067
|
1
|
|
|
|
|
|
std::error_code RETVAL; |
|
2068
|
|
|
|
|
|
|
#line 5 "t/typemap/error.xsi" |
|
2069
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2070
|
|
|
|
|
|
|
RETVAL = make_error_code(std::errc::operation_canceled); |
|
2071
|
|
|
|
|
|
|
#line 2072 "t/typemap/typemap_xsgen.cc" |
|
2072
|
|
|
|
|
|
|
{ |
|
2073
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2074
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2075
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2076
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2077
|
|
|
|
|
|
|
} |
|
2078
|
|
|
|
|
|
|
} |
|
2079
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2080
|
1
|
50
|
|
|
|
|
}); } |
|
2081
|
|
|
|
|
|
|
|
|
2082
|
|
|
|
|
|
|
|
|
2083
|
|
|
|
|
|
|
|
|
2084
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__Error_operation_chain_canceled) { xs::throw_guard(cv, [=]() |
|
2085
|
|
|
|
|
|
|
{ |
|
2086
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2087
|
4
|
50
|
|
|
|
|
if (items != 0) |
|
2088
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
2089
|
|
|
|
|
|
|
{ |
|
2090
|
8
|
|
|
|
|
|
ErrorCode RETVAL; |
|
2091
|
|
|
|
|
|
|
#line 9 "t/typemap/error.xsi" |
|
2092
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2093
|
|
|
|
|
|
|
ErrorCode orig(make_error_code(std::errc::operation_canceled)); |
|
2094
|
|
|
|
|
|
|
RETVAL = ErrorCode(make_error_code(std::errc::connection_aborted), orig); |
|
2095
|
|
|
|
|
|
|
#line 2096 "t/typemap/typemap_xsgen.cc" |
|
2096
|
|
|
|
|
|
|
{ |
|
2097
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2098
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2099
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2100
|
4
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2101
|
|
|
|
|
|
|
} |
|
2102
|
|
|
|
|
|
|
} |
|
2103
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
2104
|
4
|
50
|
|
|
|
|
}); } |
|
2105
|
|
|
|
|
|
|
|
|
2106
|
|
|
|
|
|
|
|
|
2107
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'typemap.xs' from 'error.xsi' */ |
|
2108
|
|
|
|
|
|
|
|
|
2109
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
2110
|
|
|
|
|
|
|
extern "C" |
|
2111
|
|
|
|
|
|
|
#endif |
|
2112
|
|
|
|
|
|
|
|
|
2113
|
68
|
|
|
|
|
|
XS_EXTERNAL(boot_MyTest__Typemap) { xs::throw_guard(cv, [=]() mutable |
|
2114
|
|
|
|
|
|
|
{ |
|
2115
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
2116
|
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2117
|
|
|
|
|
|
|
#else |
|
2118
|
34
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
|
50
|
|
|
|
|
|
|
2119
|
|
|
|
|
|
|
#endif |
|
2120
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
|
2121
|
|
|
|
|
|
|
char* file = __FILE__; |
|
2122
|
|
|
|
|
|
|
#else |
|
2123
|
34
|
|
|
|
|
|
const char* file = __FILE__; |
|
2124
|
|
|
|
|
|
|
#endif |
|
2125
|
|
|
|
|
|
|
|
|
2126
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
|
2127
|
|
|
|
|
|
|
|
|
2128
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
2129
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
|
2130
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
2131
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
|
2132
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
|
2133
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
|
2134
|
|
|
|
|
|
|
# endif |
|
2135
|
|
|
|
|
|
|
#endif |
|
2136
|
|
|
|
|
|
|
|
|
2137
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::dcnt", XS_MyTest_dcnt); |
|
2138
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::i8", XS_MyTest_i8); |
|
2139
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::i16", XS_MyTest_i16); |
|
2140
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::i32", XS_MyTest_i32); |
|
2141
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::i64", XS_MyTest_i64); |
|
2142
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::u8", XS_MyTest_u8); |
|
2143
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::u16", XS_MyTest_u16); |
|
2144
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::u32", XS_MyTest_u32); |
|
2145
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::u64", XS_MyTest_u64); |
|
2146
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::time_t", XS_MyTest_time_t); |
|
2147
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::av_out", XS_MyTest_av_out); |
|
2148
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::av_in", XS_MyTest_av_in); |
|
2149
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hv_out", XS_MyTest_hv_out); |
|
2150
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hv_in", XS_MyTest_hv_in); |
|
2151
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::io_out", XS_MyTest_io_out); |
|
2152
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::io_in", XS_MyTest_io_in); |
|
2153
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::cv_out", XS_MyTest_cv_out); |
|
2154
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::cv_in", XS_MyTest_cv_in); |
|
2155
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::gv_out", XS_MyTest_gv_out); |
|
2156
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::gv_in", XS_MyTest_gv_in); |
|
2157
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::new", XS_MyTest__MyConst_new); |
|
2158
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::new_const", XS_MyTest__MyConst_new_const); |
|
2159
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::get_val", XS_MyTest__MyConst_get_val); |
|
2160
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::set_val", XS_MyTest__MyConst_set_val); |
|
2161
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::set_from", XS_MyTest__MyConst_set_from); |
|
2162
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst::DESTROY", XS_MyTest__MyConst_DESTROY); |
|
2163
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::new", XS_MyTest__MyConst2_new); |
|
2164
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::new_const", XS_MyTest__MyConst2_new_const); |
|
2165
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::get_val", XS_MyTest__MyConst2_get_val); |
|
2166
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::set_val", XS_MyTest__MyConst2_set_val); |
|
2167
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::set_from", XS_MyTest__MyConst2_set_from); |
|
2168
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyConst2::DESTROY", XS_MyTest__MyConst2_DESTROY); |
|
2169
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Container::std_vector_int", XS_MyTest__Container_std_vector_int); |
|
2170
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Container::std_map_string_int", XS_MyTest__Container_std_map_string_int); |
|
2171
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Container::std_map_int_bool", XS_MyTest__Container_std_map_int_bool); |
|
2172
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::NotNull::new", XS_MyTest__NotNull_new); |
|
2173
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::NotNull::val", XS_MyTest__NotNull_val); |
|
2174
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::NotNull::set_from", XS_MyTest__NotNull_set_from); |
|
2175
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::NotNull::set_from2", XS_MyTest__NotNull_set_from2); |
|
2176
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::NotNull::DESTROY", XS_MyTest__NotNull_DESTROY); |
|
2177
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::sv_out", XS_MyTest__SvAPI_sv_out); |
|
2178
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::scalar_in", XS_MyTest__SvAPI_scalar_in); |
|
2179
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::scalar_out", XS_MyTest__SvAPI_scalar_out); |
|
2180
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::simple_in", XS_MyTest__SvAPI_simple_in); |
|
2181
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::simple_out", XS_MyTest__SvAPI_simple_out); |
|
2182
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::ref_in", XS_MyTest__SvAPI_ref_in); |
|
2183
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::ref_out", XS_MyTest__SvAPI_ref_out); |
|
2184
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::glob_in", XS_MyTest__SvAPI_glob_in); |
|
2185
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::glob_out", XS_MyTest__SvAPI_glob_out); |
|
2186
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::sub_in", XS_MyTest__SvAPI_sub_in); |
|
2187
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::sub_out", XS_MyTest__SvAPI_sub_out); |
|
2188
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::array_in", XS_MyTest__SvAPI_array_in); |
|
2189
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::array_out", XS_MyTest__SvAPI_array_out); |
|
2190
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::hash_in", XS_MyTest__SvAPI_hash_in); |
|
2191
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::hash_out", XS_MyTest__SvAPI_hash_out); |
|
2192
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::stash_in", XS_MyTest__SvAPI_stash_in); |
|
2193
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::stash_out", XS_MyTest__SvAPI_stash_out); |
|
2194
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::object_in", XS_MyTest__SvAPI_object_in); |
|
2195
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::SvAPI::object_out", XS_MyTest__SvAPI_object_out); |
|
2196
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_vv", XS_MyTest__Function_s2f_vv); |
|
2197
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_vi", XS_MyTest__Function_s2f_vi); |
|
2198
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_vi_custom", XS_MyTest__Function_s2f_vi_custom); |
|
2199
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_iis", XS_MyTest__Function_s2f_iis); |
|
2200
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_iis_custom", XS_MyTest__Function_s2f_iis_custom); |
|
2201
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f2s_vi", XS_MyTest__Function_s2f2s_vi); |
|
2202
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::s2f_notm", XS_MyTest__Function_s2f_notm); |
|
2203
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_vv", XS_MyTest__Function_bench_vv); |
|
2204
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_vi", XS_MyTest__Function_bench_vi); |
|
2205
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_iis", XS_MyTest__Function_bench_iis); |
|
2206
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_vvR", XS_MyTest__Function_bench_vvR); |
|
2207
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_viR", XS_MyTest__Function_bench_viR); |
|
2208
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Function::bench_iisR", XS_MyTest__Function_bench_iisR); |
|
2209
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Error::operation_canceled", XS_MyTest__Error_operation_canceled); |
|
2210
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::Error::operation_chain_canceled", XS_MyTest__Error_operation_chain_canceled); |
|
2211
|
|
|
|
|
|
|
|
|
2212
|
|
|
|
|
|
|
/* Initialisation Section */ |
|
2213
|
|
|
|
|
|
|
|
|
2214
|
|
|
|
|
|
|
#line 15 "t/typemap/typemap.xs" |
|
2215
|
|
|
|
|
|
|
{ |
|
2216
|
|
|
|
|
|
|
XS_BOOT(MyTest__Typemap__Object); |
|
2217
|
|
|
|
|
|
|
XS_BOOT(MyTest__Typemap__CD); |
|
2218
|
|
|
|
|
|
|
} |
|
2219
|
|
|
|
|
|
|
|
|
2220
|
|
|
|
|
|
|
#line 2221 "t/typemap/typemap_xsgen.cc" |
|
2221
|
|
|
|
|
|
|
|
|
2222
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
|
2223
|
|
|
|
|
|
|
|
|
2224
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
2225
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
|
2226
|
|
|
|
|
|
|
if (PL_unitcheckav) |
|
2227
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
|
2228
|
|
|
|
|
|
|
# endif |
|
2229
|
|
|
|
|
|
|
XSRETURN_YES; |
|
2230
|
|
|
|
|
|
|
#else |
|
2231
|
34
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
|
2232
|
|
|
|
|
|
|
#endif |
|
2233
|
34
|
50
|
|
|
|
|
}); } |
|
2234
|
|
|
|
|
|
|
|