Framework_xsgen.cc

filter: Statementstmt 76.5% 542 / 708 Branchbran 38.1% 228 / 598 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 58.9% 770 / 1306 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/svapi/io.cc ↑ Summary src/xs/typemap/object.cc »
1 /*
2 * This file was generated automatically by XS::Install::FrozenShit::ParseXS version 3.57 from the
3 * contents of Framework.xs. Do not edit this file, edit Framework.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8  
9 #line 1 "Framework.xs"
10 #include <xs.h>
11 #include <xs/CallbackDispatcher.h>
12  
13 using namespace xs;
14 using panda::ErrorCode;
15  
16 #line 17 "Framework_xsgen.cc"
17 #ifndef PERL_UNUSED_VAR
18 # define PERL_UNUSED_VAR(var) if (0) var = var
19 #endif
20  
21 #ifndef dVAR
22 # define dVAR dNOOP
23 #endif
24  
25  
26 /* This stuff is not part of the API! You have been warned. */
27 #ifndef PERL_VERSION_DECIMAL
28 # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
29 #endif
30 #ifndef PERL_DECIMAL_VERSION
31 # define PERL_DECIMAL_VERSION \
32 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
33 #endif
34 #ifndef PERL_VERSION_GE
35 # define PERL_VERSION_GE(r,v,s) \
36 (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
37 #endif
38 #ifndef PERL_VERSION_LE
39 # define PERL_VERSION_LE(r,v,s) \
40 (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
41 #endif
42  
43 /* XS_INTERNAL is the explicit static-linkage variant of the default
44 * XS macro.
45 *
46 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
47 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
48 * for anything but the BOOT XSUB.
49 *
50 * See XSUB.h in core!
51 */
52  
53  
54 /* TODO: This might be compatible further back than 5.10.0. */
55 #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
56 # undef XS_EXTERNAL
57 # undef XS_INTERNAL
58 # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
59 # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
60 # define XS_INTERNAL(name) STATIC XSPROTO(name)
61 # endif
62 # if defined(__SYMBIAN32__)
63 # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
64 # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
65 # endif
66 # ifndef XS_EXTERNAL
67 # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
68 # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
69 # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
70 # else
71 # ifdef __cplusplus
72 # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
73 # define XS_INTERNAL(name) static XSPROTO(name)
74 # else
75 # define XS_EXTERNAL(name) XSPROTO(name)
76 # define XS_INTERNAL(name) STATIC XSPROTO(name)
77 # endif
78 # endif
79 # endif
80 #endif
81  
82 /* perl >= 5.10.0 && perl <= 5.15.1 */
83  
84  
85 /* The XS_EXTERNAL macro is used for functions that must not be static
86 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
87 * macro defined, the best we can do is assume XS is the same.
88 * Dito for XS_INTERNAL.
89 */
90 #ifndef XS_EXTERNAL
91 # define XS_EXTERNAL(name) XS(name)
92 #endif
93 #ifndef XS_INTERNAL
94 # define XS_INTERNAL(name) XS(name)
95 #endif
96  
97 /* Now, finally, after all this mess, we want an XS::Install::FrozenShit::ParseXS
98 * internal macro that we're free to redefine for varying linkage due
99 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
100 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
101 */
102  
103 #undef XS_EUPXS
104 #if defined(PERL_EUPXS_ALWAYS_EXPORT)
105 # define XS_EUPXS(name) XS_EXTERNAL(name)
106 #else
107 /* default to internal */
108 # define XS_EUPXS(name) XS_INTERNAL(name)
109 #endif
110  
111 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
112 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
113  
114 /* prototype to pass -Wmissing-prototypes */
115 STATIC void
116 S_croak_xs_usage(const CV *const cv, const char *const params);
117  
118 STATIC void
119 S_croak_xs_usage(const CV *const cv, const char *const params)
120 {
121 const GV *const gv = CvGV(cv);
122  
123 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
124  
125 if (gv) {
126 const char *const gvname = GvNAME(gv);
127 const HV *const stash = GvSTASH(gv);
128 const char *const hvname = stash ? HvNAME(stash) : NULL;
129  
130 if (hvname)
131 Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
132 else
133 Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
134 } else {
135 /* Pants. I don't think that it should be possible to get here. */
136 Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
137 }
138 }
139 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
140  
141 #define croak_xs_usage S_croak_xs_usage
142  
143 #endif
144  
145 /* NOTE: the prototype of newXSproto() is different in versions of perls,
146 * so we define a portable version of newXSproto()
147 */
148 #ifdef newXS_flags
149 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
150 #else
151 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
152 #endif /* !defined(newXS_flags) */
153  
154 #if PERL_VERSION_LE(5, 21, 5)
155 # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
156 #else
157 # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
158 #endif
159  
160 /* simple backcompat versions of the TARGx() macros with no optimisation */
161 #ifndef TARGi
162 # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv)
163 # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv)
164 # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv)
165 #endif
166  
167 #line 168 "Framework_xsgen.cc"
168  
169  
170 74 ▶XS_EUPXS(XS_XS__Framework___at_perl_destroy) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework___at_perl_destroy) { xs::throw_guard(cv, [=]() 37 0 37
171 {
172 37 dVAR; dXSARGS;
173 37 ▶ if (items != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 0) 0 37 37
174 0 croak_xs_usage(cv, "");
175 PERL_UNUSED_VAR(ax); /* -Wall */
176 37 SP -= items;
177 {
178 #line 15 "Framework.xs"
179 xs::__call_at_perl_destroy();
180 #line 181 "Framework_xsgen.cc"
181 37 PUTBACK;
182 37 return;
183 }
184 37 }); }
185  
186  
187  
188 0 ▶XS_EUPXS(XS_XS__Framework___at_thread_create) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework___at_thread_create) { xs::throw_guard(cv, [=]() 0 0 0
189 {
190 0 dVAR; dXSARGS;
191 0 ▶ if (items != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 0) 0 0 0
192 0 croak_xs_usage(cv, "");
193 PERL_UNUSED_VAR(ax); /* -Wall */
194 0 SP -= items;
195 {
196 #line 19 "Framework.xs"
197 xs::__call_at_thread_create();
198 #line 199 "Framework_xsgen.cc"
199 0 PUTBACK;
200 0 return;
201 }
202 0 }); }
203  
204  
205  
206 4 ▶XS_EUPXS(XS_XS__Framework_sv_payload_attach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_sv_payload_attach) { xs::throw_guard(cv, [=]() 2 0 2
207 {
208 2 dVAR; dXSARGS;
209 2 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 2 2
210 0 croak_xs_usage(cv, "sv, payload");
211 PERL_UNUSED_VAR(ax); /* -Wall */
212 2 SP -= items;
213 {
214 2 ▶ Scalar sv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Scalar sv = ST(0); 2 0 2
215 2 ▶ if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 2 2
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 0 0
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 2 2
216 ;
217 2 ▶ SV* payload = ST(1)
Branch: 1 branch
BranchTrueFalseTotal
SV* payload = ST(1) 2 0 2
218 ;
219 #line 23 "Framework.xs"
220 sv.payload_detach(Sv::default_marker());
221 sv.payload_attach(payload, Sv::default_marker());
222 #line 223 "Framework_xsgen.cc"
223 2 PUTBACK;
224 4 return;
225 2 }
226 2 }); }
227  
228  
229  
230 10 ▶XS_EUPXS(XS_XS__Framework_sv_payload_exists) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_sv_payload_exists) { xs::throw_guard(cv, [=]() 5 0 5
231 {
232 5 dVAR; dXSARGS;
233 5 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 5 5
234 0 croak_xs_usage(cv, "sv");
235 {
236 bool RETVAL;
237 5 ▶ Scalar sv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Scalar sv = ST(0); 5 0 5
238 5 ▶ if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 5 5
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 0 0
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 5 5
239 ;
240 #line 28 "Framework.xs"
241 RETVAL = sv.payload_exists(Sv::default_marker());
242 #line 243 "Framework_xsgen.cc"
243 5 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 3 2 5
244 5 }
245 5 XSRETURN(1);
246 5 }); }
247  
248  
249  
250 6 ▶XS_EUPXS(XS_XS__Framework_sv_payload) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_sv_payload) { xs::throw_guard(cv, [=]() 3 0 3
251 {
252 3 dVAR; dXSARGS;
253 3 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 3 3
254 0 croak_xs_usage(cv, "sv");
255 PERL_UNUSED_VAR(ax); /* -Wall */
256 3 SP -= items;
257 {
258 3 ▶ Scalar sv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Scalar sv = ST(0); 3 0 3
259 3 ▶ if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 3 3
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 0 0
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 3 3
260 ;
261 #line 32 "Framework.xs"
262 SV* ret = sv.payload(Sv::default_marker()).obj;
263 if (!ret) XSRETURN_UNDEF;
264 ST(0) = ret;
265 XSRETURN(1);
266 #line 267 "Framework_xsgen.cc"
267 PUTBACK;
268 return;
269 3 }
270 3 }); }
271  
272  
273  
274 2 ▶XS_EUPXS(XS_XS__Framework_sv_payload_detach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_sv_payload_detach) { xs::throw_guard(cv, [=]() 1 0 1
275 {
276 1 dVAR; dXSARGS;
277 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
278 0 croak_xs_usage(cv, "sv");
279 {
280 int RETVAL;
281 1 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 1 0 1
dXSTARG; 0 0 0
282 1 ▶ Scalar sv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Scalar sv = ST(0); 1 0 1
283 1 ▶ if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 1 1
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 0 0
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" 0 1 1
284 ;
285 #line 39 "Framework.xs"
286 RETVAL = sv.payload_detach(Sv::default_marker());
287 #line 288 "Framework_xsgen.cc"
288 1 ▶ TARGi((IV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 1 1
TARGi((IV)RETVAL, 1); 1 0 1
289 1 ST(0) = TARG;
290 1 }
291 1 XSRETURN(1);
292 1 }); }
293  
294  
295  
296 4 ▶XS_EUPXS(XS_XS__Framework_rv_payload_attach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_rv_payload_attach) { xs::throw_guard(cv, [=]() 2 0 2
297 {
298 2 dVAR; dXSARGS;
299 2 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 2 2
300 0 croak_xs_usage(cv, "rv, payload");
301 PERL_UNUSED_VAR(ax); /* -Wall */
302 2 SP -= items;
303 {
304 2 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 2 0 2
305 2 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 2 2
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 2 2
306 ;
307 2 SV* payload = ST(1)
308 ;
309 #line 43 "Framework.xs"
310 if (!rv) throw "argument is not a reference";
311 rv.value().payload_detach(Sv::default_marker());
312 rv.value().payload_attach(payload, Sv::default_marker());
313 #line 314 "Framework_xsgen.cc"
314 2 PUTBACK;
315 4 return;
316 2 }
317 2 }); }
318  
319  
320  
321 10 ▶XS_EUPXS(XS_XS__Framework_rv_payload_exists) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_rv_payload_exists) { xs::throw_guard(cv, [=]() 5 0 5
322 {
323 5 dVAR; dXSARGS;
324 5 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 5 5
325 0 croak_xs_usage(cv, "rv");
326 {
327 bool RETVAL;
328 5 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 5 0 5
329 5 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 5 5
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 5 5
330 ;
331 #line 49 "Framework.xs"
332 if (!rv) throw "argument is not a reference";
333 RETVAL = rv.value().payload_exists(Sv::default_marker());
334 #line 335 "Framework_xsgen.cc"
335 5 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 3 2 5
336 5 }
337 5 XSRETURN(1);
338 5 }); }
339  
340  
341  
342 6 ▶XS_EUPXS(XS_XS__Framework_rv_payload) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_rv_payload) { xs::throw_guard(cv, [=]() 3 0 3
343 {
344 3 dVAR; dXSARGS;
345 3 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 3 3
346 0 croak_xs_usage(cv, "rv");
347 PERL_UNUSED_VAR(ax); /* -Wall */
348 3 SP -= items;
349 {
350 3 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 3 0 3
351 3 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 3 3
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 3 3
352 ;
353 #line 54 "Framework.xs"
354 if (!rv) throw "argument is not a reference";
355 SV* ret = rv.value().payload(Sv::default_marker()).obj;
356 if (!ret) XSRETURN_UNDEF;
357 ST(0) = ret;
358 XSRETURN(1);
359 #line 360 "Framework_xsgen.cc"
360 PUTBACK;
361 return;
362 3 }
363 3 }); }
364  
365  
366  
367 2 ▶XS_EUPXS(XS_XS__Framework_rv_payload_detach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_rv_payload_detach) { xs::throw_guard(cv, [=]() 1 0 1
368 {
369 1 dVAR; dXSARGS;
370 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
371 0 croak_xs_usage(cv, "rv");
372 {
373 int RETVAL;
374 1 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 1 0 1
dXSTARG; 0 0 0
375 1 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 1 0 1
376 1 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 1 1
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 1 1
377 ;
378 #line 62 "Framework.xs"
379 if (!rv) throw "argument is not a reference";
380 RETVAL = rv.value().payload_detach(Sv::default_marker());
381 #line 382 "Framework_xsgen.cc"
382 1 ▶ TARGi((IV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 1 1
TARGi((IV)RETVAL, 1); 1 0 1
383 1 ST(0) = TARG;
384 1 }
385 1 XSRETURN(1);
386 1 }); }
387  
388  
389  
390 8 ▶XS_EUPXS(XS_XS__Framework_any_payload_attach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_any_payload_attach) { xs::throw_guard(cv, [=]() 4 0 4
391 {
392 4 dVAR; dXSARGS;
393 4 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 4 4
394 0 croak_xs_usage(cv, "sv, payload");
395 PERL_UNUSED_VAR(ax); /* -Wall */
396 4 SP -= items;
397 {
398 4 Sv sv = ST(0)
399 ;
400 4 SV* payload = ST(1)
401 ;
402 #line 67 "Framework.xs"
403 if (sv.is_ref()) sv = Ref(sv).value();
404 sv.payload_detach(Sv::default_marker());
405 sv.payload_attach(payload, Sv::default_marker());
406 #line 407 "Framework_xsgen.cc"
407 4 PUTBACK;
408 8 return;
409 4 }
410 4 }); }
411  
412  
413  
414 20 ▶XS_EUPXS(XS_XS__Framework_any_payload_exists) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_any_payload_exists) { xs::throw_guard(cv, [=]() 10 0 10
415 {
416 10 dVAR; dXSARGS;
417 10 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 10 10
418 0 croak_xs_usage(cv, "sv");
419 {
420 bool RETVAL;
421 10 Sv sv = ST(0)
422 ;
423 #line 73 "Framework.xs"
424 if (sv.is_ref()) sv = Ref(sv).value();
425 RETVAL = sv.payload_exists(Sv::default_marker());
426 #line 427 "Framework_xsgen.cc"
427 10 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 5 5 10
428 10 }
429 10 XSRETURN(1);
430 10 }); }
431  
432  
433  
434 6 ▶XS_EUPXS(XS_XS__Framework_any_payload) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_any_payload) { xs::throw_guard(cv, [=]() 3 0 3
435 {
436 3 dVAR; dXSARGS;
437 3 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 3 3
438 0 croak_xs_usage(cv, "sv");
439 {
440 SV * RETVAL;
441 3 Sv sv = ST(0)
442 ;
443 #line 78 "Framework.xs"
444 if (sv.is_ref()) sv = Ref(sv).value();
445 SV* ret = sv.payload(Sv::default_marker()).obj;
446 if (!ret) XSRETURN_UNDEF;
447 ST(0) = ret;
448 XSRETURN(1);
449 #line 450 "Framework_xsgen.cc"
450 RETVAL = sv_2mortal(RETVAL);
451 ST(0) = RETVAL;
452 3 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 3 3
453 0 XSRETURN(1);
454 3 }); }
455  
456  
457  
458 4 ▶XS_EUPXS(XS_XS__Framework_any_payload_detach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_any_payload_detach) { xs::throw_guard(cv, [=]() 2 0 2
459 {
460 2 dVAR; dXSARGS;
461 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
462 0 croak_xs_usage(cv, "sv");
463 {
464 int RETVAL;
465 2 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 2 0 2
dXSTARG; 0 0 0
466 2 Sv sv = ST(0)
467 ;
468 #line 86 "Framework.xs"
469 if (sv.is_ref()) sv = Ref(sv).value();
470 RETVAL = sv.payload_detach(Sv::default_marker());
471 #line 472 "Framework_xsgen.cc"
472 2 ▶ TARGi((IV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 2 2
TARGi((IV)RETVAL, 1); 2 0 2
473 2 ST(0) = TARG;
474 2 }
475 2 XSRETURN(1);
476 2 }); }
477  
478  
479  
480 12 ▶XS_EUPXS(XS_XS__Framework_obj2hv) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_obj2hv) { xs::throw_guard(cv, [=]() 4 0 4
481 {
482 6 dVAR; dXSARGS;
483 6 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 6 6
484 0 croak_xs_usage(cv, "rv");
485 PERL_UNUSED_VAR(ax); /* -Wall */
486 6 SP -= items;
487 {
488 6 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 6 0 6
489 6 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 6 6
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 6 6
490 ;
491 #line 91 "Framework.xs"
492 if (!rv) throw "argument is not a reference";
493 auto sv = rv.value();
494 if (SvOK(sv)) throw "only references to undefs can be upgraded";
495 sv.upgrade(SVt_PVHV);
496 #line 497 "Framework_xsgen.cc"
497 4 PUTBACK;
498 8 return;
499 8 }
500 4 }); }
501  
502  
503  
504 4 ▶XS_EUPXS(XS_XS__Framework_obj2av) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework_obj2av) { xs::throw_guard(cv, [=]() 1 0 1
505 {
506 2 dVAR; dXSARGS;
507 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
508 0 croak_xs_usage(cv, "rv");
509 PERL_UNUSED_VAR(ax); /* -Wall */
510 2 SP -= items;
511 {
512 2 ▶ Ref rv = ST(0);
Branch: 1 branch
BranchTrueFalseTotal
Ref rv = ST(0); 2 0 2
513 2 ▶ if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 2 2
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 0 0
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" 0 2 2
514 ;
515 #line 98 "Framework.xs"
516 if (!rv) throw "argument is not a reference";
517 auto sv = rv.value();
518 if (SvOK(sv)) throw "only references to undefs can be upgraded";
519 sv.upgrade(SVt_PVAV);
520 #line 521 "Framework_xsgen.cc"
521 1 PUTBACK;
522 2 return;
523 3 }
524 1 }); }
525  
526  
527 /* INCLUDE: Including 'Error.xsi' from 'Framework.xs' */
528  
529 void register_error_constants(); // regerror.cc, because fucking xsubpp removes preprocessor directives
530  
531  
532 2 ▶XS_EUPXS(XS_XS__STL__ErrorCode_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode_new) { xs::throw_guard(cv, [=]() 1 0 1
533 {
534 1 dVAR; dXSARGS;
535 1 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 1 1
536 0 croak_xs_usage(cv, "_____unused1, ec, category");
537 {
538 1 std::error_code RETVAL;
539 1 ▶ int ec = (int)SvIV(ST(1))
Branch: 1 branch
BranchTrueFalseTotal
int ec = (int)SvIV(ST(1)) 1 0 1
540 ;
541 1 ▶ const std::error_category* category = xs::in<const std::error_category *>(ST(2));
Branch: 1 branch
BranchTrueFalseTotal
const std::error_category* category = xs::in<const std::error_category *>(ST(2)); 1 0 1
542 ;
543 #line 13 "./Error.xsi"
544 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
545 if (!category) throw "category required";
546 RETVAL = std::error_code(ec, *category);
547 #line 548 "Framework_xsgen.cc"
548 {
549 SV * RETVALSV;
550 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
551 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
552 1 ST(0) = RETVALSV;
553 }
554 1 }
555 1 XSRETURN(1);
556 1 }); }
557  
558  
559  
560 252 ▶XS_EUPXS(XS_XS__STL__ErrorCode_value) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode_value) { xs::throw_guard(cv, [=]() 126 0 126
561 {
562 126 dVAR; dXSARGS;
563 126 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 126 126
564 0 croak_xs_usage(cv, "ec");
565 {
566 int RETVAL;
567 126 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 126 0 126
dXSTARG; 0 0 0
568 126 ▶ std::error_code ec = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec = xs::in<std::error_code>(ST(0)); 126 0 126
569 ;
570 #line 18 "./Error.xsi"
571 RETVAL = ec.value();
572 #line 573 "Framework_xsgen.cc"
573 126 ▶ TARGi((IV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 60 66 126
TARGi((IV)RETVAL, 1); 66 0 66
574 126 ST(0) = TARG;
575 }
576 126 XSRETURN(1);
577 126 }); }
578  
579  
580  
581 4 ▶XS_EUPXS(XS_XS__STL__ErrorCode_category) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode_category) { xs::throw_guard(cv, [=]() 2 0 2
582 {
583 2 dVAR; dXSARGS;
584 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
585 0 croak_xs_usage(cv, "ec");
586 {
587 const std::error_category * RETVAL;
588 2 ▶ std::error_code ec = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec = xs::in<std::error_code>(ST(0)); 2 0 2
589 ;
590 #line 22 "./Error.xsi"
591 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
592 RETVAL = &ec.category();
593 #line 594 "Framework_xsgen.cc"
594 {
595 SV * RETVALSV;
596 2 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 2 0 2
597 2 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 2 0 2
598 2 ST(0) = RETVALSV;
599 }
600 2 }
601 2 XSRETURN(1);
602 2 }); }
603  
604  
605  
606 4 ▶XS_EUPXS(XS_XS__STL__ErrorCode_message) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode_message) { xs::throw_guard(cv, [=]() 2 0 2
607 {
608 2 dVAR; dXSARGS;
609 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
610 0 croak_xs_usage(cv, "ec");
611 {
612 2 std::string RETVAL;
613 2 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 2 0 2
dXSTARG; 0 0 0
614 2 ▶ std::error_code ec = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec = xs::in<std::error_code>(ST(0)); 2 0 2
615 ;
616 #line 26 "./Error.xsi"
617 RETVAL = ec.message();
618 #line 619 "Framework_xsgen.cc"
619 2 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 2 0 2
620 2 ST(0) = TARG;
621 2 }
622 2 XSRETURN(1);
623 2 }); }
624  
625  
626  
627 0 ▶XS_EUPXS(XS_XS__STL__ErrorCode__op_string) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode__op_string) { xs::throw_guard(cv, [=]() 0 0 0
628 {
629 0 dVAR; dXSARGS;
630 0 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 0 0
631 0 croak_xs_usage(cv, "ec, ...");
632 {
633 0 std::string RETVAL;
634 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
635 0 ▶ std::error_code ec = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec = xs::in<std::error_code>(ST(0)); 0 0 0
636 ;
637 #line 30 "./Error.xsi"
638 RETVAL = ec.message();
639 RETVAL += " (";
640 RETVAL += std::to_string(ec.value());
641 RETVAL += ":";
642 RETVAL += ec.category().name();
643 RETVAL += ")";
644 #line 645 "Framework_xsgen.cc"
645 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
646 0 ST(0) = TARG;
647 0 }
648 0 XSRETURN(1);
649 0 }); }
650  
651  
652  
653 0 ▶XS_EUPXS(XS_XS__STL__ErrorCode__op_bool) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode__op_bool) { xs::throw_guard(cv, [=]() 0 0 0
654 {
655 0 dVAR; dXSARGS;
656 0 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 0 0
657 0 croak_xs_usage(cv, "ec, ...");
658 {
659 bool RETVAL;
660 0 ▶ std::error_code ec = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec = xs::in<std::error_code>(ST(0)); 0 0 0
661 ;
662 #line 39 "./Error.xsi"
663 RETVAL = ec.value();
664 #line 665 "Framework_xsgen.cc"
665 0 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 0 0 0
666 }
667 0 XSRETURN(1);
668 0 }); }
669  
670  
671  
672 138 ▶XS_EUPXS(XS_XS__STL__ErrorCode__op_eq) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCode__op_eq) { xs::throw_guard(cv, [=]() 69 0 69
673 {
674 69 dVAR; dXSARGS;
675 69 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 69 69
676 0 croak_xs_usage(cv, "ec1, sv_ec2, ...");
677 {
678 bool RETVAL;
679 69 ▶ std::error_code ec1 = xs::in<std::error_code>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code ec1 = xs::in<std::error_code>(ST(0)); 69 0 69
680 ;
681 69 Sv sv_ec2 = ST(1)
682 ;
683 #line 43 "./Error.xsi"
684 if (sv_ec2.is_object_ref()) {
685 Object ec2 = sv_ec2;
686 auto class_name = ec2.stash().name();
687 if (class_name == "XS::ErrorCode") {
688 RETVAL = ec1 & xs::in<ErrorCode>(sv_ec2);
689 } else if (class_name == "XS::STL::ErrorCode") {
690 RETVAL = ec1 == xs::in<std::error_code>(sv_ec2);
691 } else {
692 RETVAL = false;
693 }
694 } else if (SvIOK(sv_ec2)) {
695 int code = Simple(sv_ec2);
696 RETVAL = ec1.value() == code;
697 } else {
698 RETVAL = false;
699 }
700 #line 701 "Framework_xsgen.cc"
701 69 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 68 1 69
702 69 }
703 69 XSRETURN(1);
704 69 }); }
705  
706  
707  
708 6 ▶XS_EUPXS(XS_XS__STL__ErrorCategory_name) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCategory_name) { xs::throw_guard(cv, [=]() 3 0 3
709 {
710 3 dVAR; dXSARGS;
711 3 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 3 3
712 0 croak_xs_usage(cv, "THIS");
713 {
714 const char * RETVAL;
715 3 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 3 0 3
716 3 ▶ const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 3 3
717 ;
718 #line 64 "./Error.xsi"
719 RETVAL = THIS->name();
720 #line 721 "Framework_xsgen.cc"
721 3 sv_setpv((SV*)TARG, RETVAL);
722 3 ST(0) = TARG;
723 }
724 3 XSRETURN(1);
725 3 }); }
726  
727  
728  
729 0 ▶XS_EUPXS(XS_XS__STL__ErrorCategory_message) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCategory_message) { xs::throw_guard(cv, [=]() 0 0 0
730 {
731 0 dVAR; dXSARGS;
732 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
733 0 croak_xs_usage(cv, "THIS, ec");
734 {
735 0 std::string RETVAL;
736 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
737 0 ▶ const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
738 ;
739 0 ▶ int ec = (int)SvIV(ST(1))
Branch: 2 branches
BranchTrueFalseTotal
int ec = (int)SvIV(ST(1)) 0 0 0
int ec = (int)SvIV(ST(1)) 0 0 0
740 ;
741 #line 66 "./Error.xsi"
742 RETVAL = THIS->message(ec);
743 #line 744 "Framework_xsgen.cc"
744 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
745 0 ST(0) = TARG;
746 0 }
747 0 XSRETURN(1);
748 0 }); }
749  
750  
751  
752 0 ▶XS_EUPXS(XS_XS__STL__ErrorCategory__op_string) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCategory__op_string) { xs::throw_guard(cv, [=]() 0 0 0
753 {
754 0 dVAR; dXSARGS;
755 0 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 0 0
756 0 croak_xs_usage(cv, "THIS, ...");
757 {
758 0 std::string RETVAL;
759 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
760 0 ▶ const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
761 ;
762 #line 69 "./Error.xsi"
763 RETVAL = THIS->name();
764 #line 765 "Framework_xsgen.cc"
765 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
766 0 ST(0) = TARG;
767 0 }
768 0 XSRETURN(1);
769 0 }); }
770  
771  
772  
773 6 ▶XS_EUPXS(XS_XS__STL__ErrorCategory__op_eq) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__STL__ErrorCategory__op_eq) { xs::throw_guard(cv, [=]() 3 0 3
774 {
775 3 dVAR; dXSARGS;
776 3 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 3 3
777 0 croak_xs_usage(cv, "THIS, oth, ...");
778 {
779 bool RETVAL;
780 3 ▶ const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
const std::error_category* THIS = xs::in<const std::error_category *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 3 3
781 ;
782 3 const std::error_category* oth = xs::in<const std::error_category *>(ST(1));
783 ;
784 #line 73 "./Error.xsi"
785 RETVAL = *THIS == *oth;
786 #line 787 "Framework_xsgen.cc"
787 3 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 3 0 3
788 }
789 3 XSRETURN(1);
790 3 }); }
791  
792  
793  
794 0 ▶XS_EUPXS(XS_XS__ErrorCode_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_new) { xs::throw_guard(cv, [=]() 0 0 0
795 {
796 0 dVAR; dXSARGS;
797 0 ▶ if (items < 2 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 2 || items > 3) 0 0 0
if (items < 2 || items > 3) 0 0 0
798 0 croak_xs_usage(cv, "_____unused2, c, next= ErrorCode()");
799 {
800 0 ErrorCode RETVAL;
801 0 ▶ std::error_code c = xs::in<std::error_code>(ST(1));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code c = xs::in<std::error_code>(ST(1)); 0 0 0
802 ;
803 0 ErrorCode next;
804  
805 0 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 0 0 0
806 0 next = ErrorCode();
807 else {
808 0 ▶ next = xs::in<ErrorCode>(ST(2));
Branch: 1 branch
BranchTrueFalseTotal
next = xs::in<ErrorCode>(ST(2)); 0 0 0
809 ;
810 }
811 #line 80 "./Error.xsi"
812 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
813 if (next) RETVAL = ErrorCode(c, next);
814 else RETVAL = ErrorCode(c);
815 #line 816 "Framework_xsgen.cc"
816 {
817 SV * RETVALSV;
818 0 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 0 0 0
819 0 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 0 0 0
820 0 ST(0) = RETVALSV;
821 }
822 0 }
823 0 XSRETURN(1);
824 0 }); }
825  
826  
827  
828 4 ▶XS_EUPXS(XS_XS__ErrorCode_value) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_value) { xs::throw_guard(cv, [=]() 2 0 2
829 {
830 2 dVAR; dXSARGS;
831 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
832 0 croak_xs_usage(cv, "ec");
833 {
834 int RETVAL;
835 2 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 2 0 2
dXSTARG; 0 0 0
836 2 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 2 0 2
837 ;
838 #line 85 "./Error.xsi"
839 RETVAL = ec.value();
840 #line 841 "Framework_xsgen.cc"
841 2 ▶ TARGi((IV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 2 2
TARGi((IV)RETVAL, 1); 2 0 2
842 2 ST(0) = TARG;
843 2 }
844 2 XSRETURN(1);
845 2 }); }
846  
847  
848  
849 2 ▶XS_EUPXS(XS_XS__ErrorCode_category) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_category) { xs::throw_guard(cv, [=]() 1 0 1
850 {
851 1 dVAR; dXSARGS;
852 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
853 0 croak_xs_usage(cv, "ec");
854 {
855 const std::error_category * RETVAL;
856 1 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 1 0 1
857 ;
858 #line 89 "./Error.xsi"
859 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
860 RETVAL = &ec.category();
861 #line 862 "Framework_xsgen.cc"
862 {
863 SV * RETVALSV;
864 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
865 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
866 1 ST(0) = RETVALSV;
867 }
868 1 }
869 1 XSRETURN(1);
870 1 }); }
871  
872  
873  
874 2 ▶XS_EUPXS(XS_XS__ErrorCode_message) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_message) { xs::throw_guard(cv, [=]() 1 0 1
875 {
876 1 dVAR; dXSARGS;
877 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
878 0 croak_xs_usage(cv, "ec");
879 {
880 1 std::string RETVAL;
881 1 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 1 0 1
dXSTARG; 0 0 0
882 1 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 1 0 1
883 ;
884 #line 93 "./Error.xsi"
885 RETVAL = ec.message();
886 #line 887 "Framework_xsgen.cc"
887 1 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 1 0 1
888 1 ST(0) = TARG;
889 1 }
890 1 XSRETURN(1);
891 1 }); }
892  
893  
894  
895 2 ▶XS_EUPXS(XS_XS__ErrorCode_code) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_code) { xs::throw_guard(cv, [=]() 1 0 1
896 {
897 1 dVAR; dXSARGS;
898 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
899 0 croak_xs_usage(cv, "ec");
900 {
901 1 std::error_code RETVAL;
902 1 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 1 0 1
903 ;
904 #line 97 "./Error.xsi"
905 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
906 RETVAL = ec.code();
907 #line 908 "Framework_xsgen.cc"
908 {
909 SV * RETVALSV;
910 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
911 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
912 1 ST(0) = RETVALSV;
913 }
914 1 }
915 1 XSRETURN(1);
916 1 }); }
917  
918  
919  
920 2 ▶XS_EUPXS(XS_XS__ErrorCode_next) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_next) { xs::throw_guard(cv, [=]() 1 0 1
921 {
922 1 dVAR; dXSARGS;
923 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
924 0 croak_xs_usage(cv, "ec");
925 {
926 1 ErrorCode RETVAL;
927 1 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 1 0 1
928 ;
929 #line 101 "./Error.xsi"
930 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
931 RETVAL = ec.next();
932 #line 933 "Framework_xsgen.cc"
933 {
934 SV * RETVALSV;
935 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
936 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
937 1 ST(0) = RETVALSV;
938 }
939 1 }
940 1 XSRETURN(1);
941 1 }); }
942  
943  
944  
945 0 ▶XS_EUPXS(XS_XS__ErrorCode__op_string) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode__op_string) { xs::throw_guard(cv, [=]() 0 0 0
946 {
947 0 dVAR; dXSARGS;
948 0 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 0 0
949 0 croak_xs_usage(cv, "ec, ...");
950 {
951 0 std::string RETVAL;
952 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
953 0 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 0 0 0
954 ;
955 #line 105 "./Error.xsi"
956 if (!ec) XSRETURN_UNDEF;
957 RETVAL = ec.what();
958 #line 959 "Framework_xsgen.cc"
959 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
960 0 ST(0) = TARG;
961 0 ▶ }
Branch: 2 branches
BranchTrueFalseTotal
} 0 0 0
} 0 0 0
962 0 XSRETURN(1);
963 0 }); }
964  
965  
966  
967 0 ▶XS_EUPXS(XS_XS__ErrorCode__op_bool) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode__op_bool) { xs::throw_guard(cv, [=]() 0 0 0
968 {
969 0 dVAR; dXSARGS;
970 0 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 0 0
971 0 croak_xs_usage(cv, "ec, ...");
972 {
973 bool RETVAL;
974 0 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 0 0 0
975 ;
976 #line 110 "./Error.xsi"
977 RETVAL = ec.value();
978 #line 979 "Framework_xsgen.cc"
979 0 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 0 0 0
980 0 }
981 0 XSRETURN(1);
982 0 }); }
983  
984  
985  
986 16 ▶XS_EUPXS(XS_XS__ErrorCode__op_eq) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode__op_eq) { xs::throw_guard(cv, [=]() 8 0 8
987 {
988 8 dVAR; dXSARGS;
989 8 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 8 8
990 0 croak_xs_usage(cv, "ec1, sv_ec2, ...");
991 {
992 bool RETVAL;
993 8 ▶ ErrorCode ec1 = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec1 = xs::in<ErrorCode>(ST(0)); 8 0 8
994 ;
995 8 Sv sv_ec2 = ST(1)
996 ;
997 #line 114 "./Error.xsi"
998 if (sv_ec2.is_object_ref()) {
999 Object ec2 = sv_ec2;
1000 auto class_name = ec2.stash().name();
1001 if (class_name == "XS::ErrorCode") {
1002 RETVAL = ec1 == xs::in<ErrorCode>(sv_ec2);
1003 } else if (class_name == "XS::STL::ErrorCode") {
1004 RETVAL = ec1 & xs::in<std::error_code>(sv_ec2);
1005 } else {
1006 RETVAL = false;
1007 }
1008 } else if (SvIOK(sv_ec2)) {
1009 int code = Simple(sv_ec2);
1010 RETVAL = ec1.value() == code;
1011 } else {
1012 RETVAL = false;
1013 }
1014 #line 1015 "Framework_xsgen.cc"
1015 8 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 7 1 8
1016 8 }
1017 8 XSRETURN(1);
1018 8 }); }
1019  
1020  
1021  
1022 2 ▶XS_EUPXS(XS_XS__ErrorCode_contains) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__ErrorCode_contains) { xs::throw_guard(cv, [=]() 1 0 1
1023 {
1024 1 dVAR; dXSARGS;
1025 1 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 1 1
1026 0 croak_xs_usage(cv, "ec, c");
1027 {
1028 bool RETVAL;
1029 1 ▶ ErrorCode ec = xs::in<ErrorCode>(ST(0));
Branch: 1 branch
BranchTrueFalseTotal
ErrorCode ec = xs::in<ErrorCode>(ST(0)); 1 0 1
1030 ;
1031 1 ▶ std::error_code c = xs::in<std::error_code>(ST(1));
Branch: 1 branch
BranchTrueFalseTotal
std::error_code c = xs::in<std::error_code>(ST(1)); 1 0 1
1032 ;
1033 #line 133 "./Error.xsi"
1034 RETVAL = ec.contains(c);
1035 #line 1036 "Framework_xsgen.cc"
1036 1 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 1 0 1
1037 1 }
1038 1 XSRETURN(1);
1039 1 }); }
1040  
1041  
1042 /* INCLUDE: Returning to 'Framework.xs' from 'Error.xsi' */
1043  
1044  
1045 /* INCLUDE: Including 'CallbackDispatcher.xsi' from 'Framework.xs' */
1046  
1047 namespace {
1048 15 static OP* pp_padsv_proxy (pTHX) {
1049 15 return PL_ppaddr[OP_PADSV](aTHX);
1050 }
1051  
1052 // adds "return unless defined $weak_ref" perl code to the top of subroutine
1053 10 static void add_weak_ref_check (const Sub& sub, PADOFFSET i) {
1054 10 auto root = CvROOT(sub);
1055 10 ▶ if (root->op_type != OP_LEAVESUB) throw "bad closure";
Branch: 1 branch
BranchTrueFalseTotal
if (root->op_type != OP_LEAVESUB) throw "bad closure"; 0 10 10
1056 10 auto lineseq = cUNOPx(root)->op_first;
1057 10 ▶ if (lineseq->op_type != OP_LINESEQ) throw "bad closure";
Branch: 1 branch
BranchTrueFalseTotal
if (lineseq->op_type != OP_LINESEQ) throw "bad closure"; 0 10 10
1058  
1059 10 OP* orig_start = CvSTART(sub);
1060  
1061 // return if this CV has already been injected
1062 10 ▶ if (orig_start->op_ppaddr == pp_padsv_proxy) return;
Branch: 1 branch
BranchTrueFalseTotal
if (orig_start->op_ppaddr == pp_padsv_proxy) return; 0 10 10
1063  
1064 // check if we've already done this on another CVs with the same proto
1065 10 auto check_op = cLISTOPx(lineseq)->op_first;
1066 10 ▶ if (check_op && check_op->op_type == OP_NULL) {
Branch: 2 branches
BranchTrueFalseTotal
if (check_op && check_op->op_type == OP_NULL) { 10 0 10
if (check_op && check_op->op_type == OP_NULL) { 4 6 10
1067 4 check_op = cUNOPx(check_op)->op_first;
1068 4 ▶ if (check_op->op_type == OP_OR) {
Branch: 1 branch
BranchTrueFalseTotal
if (check_op->op_type == OP_OR) { 4 0 4
1069 4 check_op = cLISTOPx(check_op)->op_first;
1070 4 ▶ if (check_op && check_op->op_type == OP_DEFINED) {
Branch: 2 branches
BranchTrueFalseTotal
if (check_op && check_op->op_type == OP_DEFINED) { 4 0 4
if (check_op && check_op->op_type == OP_DEFINED) { 4 0 4
1071 4 check_op = cUNOPx(check_op)->op_first;
1072 4 ▶ if (check_op->op_ppaddr == pp_padsv_proxy) {
Branch: 1 branch
BranchTrueFalseTotal
if (check_op->op_ppaddr == pp_padsv_proxy) { 4 0 4
1073 4 CvSTART(sub) = check_op;
1074 4 return;
1075 }
1076 }
1077 }
1078 }
1079  
1080 /* We're creating here the optree and insert it into the beginning
1081 *
1082 5 or LOGOP(0x560e863d99d0) ===> 6 [nextstate 0x560e863d9df8]
1083 PARENT ===> 7 [null 0x560e863d9998]
1084 FLAGS = (VOID,KIDS,SLABBED)
1085 PRIVATE = (0x1)
1086 OTHER ===> 8 [pushmark 0x560e863d9ab8]
1087 |
1088 4 +--defined UNOP(0x560e863d9a10) ===> 5 [or 0x560e863d99d0]
1089 | FLAGS = (SCALAR,KIDS,SLABBED,MORESIB)
1090 | PRIVATE = (0x1)
1091 | |
1092 2 | +--padsv OP(0x560e863d9a48) ===> 4 [defined 0x560e863d9a10]
1093 | TARG = 1
1094 | FLAGS = (SCALAR,SLABBED)
1095 |
1096 9 +--return LISTOP(0x560e863d9a78) ===> 6 [nextstate 0x560e863d9df8]
1097 FLAGS = (UNKNOWN,KIDS,SLABBED)
1098 |
1099 8 +--pushmark OP(0x560e863d9ab8) ===> 9 [return 0x560e863d9a78]
1100 FLAGS = (SCALAR,SLABBED)
1101 */
1102  
1103 6 auto old_PL_compcv = PL_compcv;
1104 6 PL_compcv = sub; // older perls require compilation context during OP creation
1105  
1106 6 OP* op_pushmark = newOP(OP_PUSHMARK, 0);
1107 6 OP* op_return = newLISTOP(OP_RETURN, 0, op_pushmark, nullptr);
1108 6 op_pushmark->op_next = op_return;
1109  
1110 6 OP* op_padsv = newOP(OP_PADSV, 0);
1111 6 op_padsv->op_targ = i; // set correct index in padlist
1112 6 op_padsv->op_ppaddr = pp_padsv_proxy; // for marking that we've already done this
1113 6 OP* op_defined = newUNOP(OP_DEFINED, 0, op_padsv);
1114 6 op_padsv->op_next = op_defined;
1115  
1116 6 OP* op_null = newLOGOP(OP_OR, OPf_WANT_VOID, op_defined, op_return);
1117 6 OP* op_or = cUNOPx(op_null)->op_first;
1118  
1119 6 op_defined->op_next = op_or;
1120 6 op_or->op_next = orig_start; // this is the true case
1121 6 op_return->op_next = orig_start; // doesnt matter what next
1122 6 cLOGOPx(op_or)->op_other = op_pushmark; // this is the false case
1123  
1124 // add the whole generated tree to OP_LINESEQ (our top-op is op_null). It is not required for execution, but required for correct
1125 // work of op_free and also debug modules like B::Concise and others.
1126 6 op_sibling_splice(lineseq, NULL, 0, op_null);
1127  
1128 6 CvSTART(sub) = op_padsv; // set new entry op
1129  
1130 6 PL_compcv = old_PL_compcv; // restore orig value
1131 }
1132 }
1133  
1134  
1135 24 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add) { xs::throw_guard(cv, [=]() 12 0 12
1136 {
1137 12 dVAR; dXSARGS;
1138 12 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 12 12
1139 0 croak_xs_usage(cv, "THIS, cv");
1140 PERL_UNUSED_VAR(ax); /* -Wall */
1141 12 SP -= items;
1142 {
1143 12 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 12 0 12
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 12 12
1144 ;
1145 12 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 12 0 12
1146 12 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 12 12
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 12 12
1147 ;
1148 #line 94 "./CallbackDispatcher.xsi"
1149 THIS->add(cv);
1150 #line 1151 "Framework_xsgen.cc"
1151 12 PUTBACK;
1152 24 return;
1153 12 }
1154 12 }); }
1155  
1156  
1157  
1158 30 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_weak) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_weak) { xs::throw_guard(cv, [=]() 10 0 10
1159 {
1160 15 dVAR; dXSARGS;
1161 15 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 15 15
1162 0 croak_xs_usage(cv, "THIS, ref, sub");
1163 PERL_UNUSED_VAR(ax); /* -Wall */
1164 15 SP -= items;
1165 {
1166 15 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 15 0 15
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 15 15
1167 ;
1168 15 ▶ Ref ref = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Ref ref = ST(1); 14 1 15
1169 14 ▶ if (!ref && SvOK(ST(1))) throw "arg is not a 'Ref' value"
Branch: 3 branches
BranchTrueFalseTotal
if (!ref && SvOK(ST(1))) throw "arg is not a 'Ref' value" 1 13 14
if (!ref && SvOK(ST(1))) throw "arg is not a 'Ref' value" 0 1 1
if (!ref && SvOK(ST(1))) throw "arg is not a 'Ref' value" 0 14 14
1170 ;
1171 14 ▶ Sub sub = ST(2);
Branch: 1 branch
BranchTrueFalseTotal
Sub sub = ST(2); 14 0 14
1172 14 ▶ if (!sub && SvOK(ST(2))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!sub && SvOK(ST(2))) throw "arg is not a 'Sub' reference" 1 13 14
if (!sub && SvOK(ST(2))) throw "arg is not a 'Sub' reference" 0 1 1
if (!sub && SvOK(ST(2))) throw "arg is not a 'Sub' reference" 0 14 14
1173 ;
1174 #line 97 "./CallbackDispatcher.xsi"
1175 if (!sub) throw "callback must be defined";
1176 if (!ref) throw "data to weaken must be defined";
1177  
1178 auto refval = ref.value();
1179 SV** varptr = nullptr;
1180 auto padlist = CvPADLIST(sub);
1181 PADOFFSET i;
1182 if (padlist) {
1183 SV** vars = AvARRAY(PadlistARRAY(padlist)[1]);
1184 auto padlist_names = PadlistNAMES(padlist);
1185 auto pnames = PadnamelistARRAY(padlist_names);
1186 for (i = 1; i <= PadnamelistMAX(padlist_names); ++i) {
1187 auto padname = pnames[i];
1188 if (!padname || !PadnamePV(padname) || !PadnameOUTER(padname)) continue;
1189 auto var = vars[i];
1190 if (SvROK(var) && SvRV(var) == refval) {
1191 varptr = &vars[i];
1192 break;
1193 }
1194 }
1195 }
1196 if (!varptr) throw "passed argument is not captured by subroutine";
1197  
1198 if (!SvWEAKREF(*varptr)) {
1199 SvREFCNT_dec_NN(*varptr);
1200 *varptr = newRV(ref.value());
1201 sv_rvweaken(*varptr);
1202 }
1203  
1204 add_weak_ref_check(sub, i);
1205  
1206 THIS->add(sub);
1207 #line 1208 "Framework_xsgen.cc"
1208 10 PUTBACK;
1209 20 return;
1210 20 }
1211 10 }); }
1212  
1213  
1214  
1215 0 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_prepend) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_prepend) { xs::throw_guard(cv, [=]() 0 0 0
1216 {
1217 0 dVAR; dXSARGS;
1218 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
1219 0 croak_xs_usage(cv, "THIS, cv");
1220 PERL_UNUSED_VAR(ax); /* -Wall */
1221 0 SP -= items;
1222 {
1223 0 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1224 ;
1225 0 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 0 0 0
1226 0 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
1227 ;
1228 #line 131 "./CallbackDispatcher.xsi"
1229 THIS->prepend(cv);
1230 #line 1231 "Framework_xsgen.cc"
1231 0 PUTBACK;
1232 0 return;
1233 0 }
1234 0 }); }
1235  
1236  
1237  
1238 46 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener) { xs::throw_guard(cv, [=]() 23 0 23
1239 {
1240 23 dVAR; dXSARGS;
1241 23 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 23 23
1242 0 croak_xs_usage(cv, "THIS, cv");
1243 PERL_UNUSED_VAR(ax); /* -Wall */
1244 23 SP -= items;
1245 {
1246 23 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 23 0 23
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 23 23
1247 ;
1248 23 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 23 0 23
1249 23 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 23 23
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 23 23
1250 ;
1251 #line 133 "./CallbackDispatcher.xsi"
1252 THIS->add_event_listener(cv);
1253 #line 1254 "Framework_xsgen.cc"
1254 23 PUTBACK;
1255 46 return;
1256 23 }
1257 23 }); }
1258  
1259  
1260  
1261 2 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_prepend_event_listener) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_prepend_event_listener) { xs::throw_guard(cv, [=]() 1 0 1
1262 {
1263 1 dVAR; dXSARGS;
1264 1 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 1 1
1265 0 croak_xs_usage(cv, "THIS, cv");
1266 PERL_UNUSED_VAR(ax); /* -Wall */
1267 1 SP -= items;
1268 {
1269 1 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 1 0 1
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 1 1
1270 ;
1271 1 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 1 0 1
1272 1 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 1 1
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 1 1
1273 ;
1274 #line 135 "./CallbackDispatcher.xsi"
1275 THIS->prepend_event_listener(cv);
1276 #line 1277 "Framework_xsgen.cc"
1277 1 PUTBACK;
1278 2 return;
1279 1 }
1280 1 }); }
1281  
1282  
1283  
1284 8 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove) { xs::throw_guard(cv, [=]() 4 0 4
1285 {
1286 4 dVAR; dXSARGS;
1287 4 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 4 4
1288 0 croak_xs_usage(cv, "THIS, cv");
1289 PERL_UNUSED_VAR(ax); /* -Wall */
1290 4 SP -= items;
1291 {
1292 4 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 4 0 4
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 4 4
1293 ;
1294 4 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 4 0 4
1295 4 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 4 4
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 4 4
1296 ;
1297 #line 137 "./CallbackDispatcher.xsi"
1298 THIS->remove(cv);
1299 #line 1300 "Framework_xsgen.cc"
1300 4 PUTBACK;
1301 8 return;
1302 4 }
1303 4 }); }
1304  
1305  
1306  
1307 4 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_event_listener) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_event_listener) { xs::throw_guard(cv, [=]() 2 0 2
1308 {
1309 2 dVAR; dXSARGS;
1310 2 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 2 2
1311 0 croak_xs_usage(cv, "THIS, cv");
1312 PERL_UNUSED_VAR(ax); /* -Wall */
1313 2 SP -= items;
1314 {
1315 2 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 2 0 2
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 2 2
1316 ;
1317 2 ▶ Sub cv = ST(1);
Branch: 1 branch
BranchTrueFalseTotal
Sub cv = ST(1); 2 0 2
1318 2 ▶ if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
Branch: 3 branches
BranchTrueFalseTotal
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 2 2
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 0 0
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" 0 2 2
1319 ;
1320 #line 139 "./CallbackDispatcher.xsi"
1321 THIS->remove_event_listener(cv);
1322 #line 1323 "Framework_xsgen.cc"
1323 2 PUTBACK;
1324 4 return;
1325 2 }
1326 2 }); }
1327  
1328  
1329  
1330 46 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_all) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_all) { xs::throw_guard(cv, [=]() 23 0 23
1331 {
1332 23 dVAR; dXSARGS;
1333 23 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 23 23
1334 0 croak_xs_usage(cv, "THIS");
1335 PERL_UNUSED_VAR(ax); /* -Wall */
1336 23 SP -= items;
1337 {
1338 23 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 23 23
1339 ;
1340 #line 141 "./CallbackDispatcher.xsi"
1341 THIS->remove_all();
1342 #line 1343 "Framework_xsgen.cc"
1343 23 PUTBACK;
1344 23 return;
1345 }
1346 23 }); }
1347  
1348  
1349  
1350 20 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_has_listeners) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_has_listeners) { xs::throw_guard(cv, [=]() 10 0 10
1351 {
1352 10 dVAR; dXSARGS;
1353 10 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 10 10
1354 0 croak_xs_usage(cv, "THIS");
1355 {
1356 bool RETVAL;
1357 10 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 10 10
1358 ;
1359 #line 143 "./CallbackDispatcher.xsi"
1360 RETVAL = THIS->has_listeners();
1361 #line 1362 "Framework_xsgen.cc"
1362 10 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 5 5 10
1363 }
1364 10 XSRETURN(1);
1365 10 }); }
1366  
1367  
1368  
1369 78 ▶XS_EUPXS(XS_XS__Framework__CallbackDispatcher_call) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_call) { xs::throw_guard(cv, [=]() 34 0 34
1370 {
1371 39 dVAR; dXSARGS;
1372 39 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 39 39
1373 0 croak_xs_usage(cv, "THIS, ...");
1374 {
1375 39 Sv RETVAL;
1376 39 ▶ XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 39 0 39
XSCallbackDispatcher* THIS = xs::in<XSCallbackDispatcher *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 39 39
1377 ;
1378 #line 146 "./CallbackDispatcher.xsi"
1379 RETVAL = THIS->call(&ST(1), items - 1);
1380 if (!RETVAL) XSRETURN_EMPTY;
1381 #line 1382 "Framework_xsgen.cc"
1382 {
1383 SV * RETVALSV;
1384 11 RETVALSV = NULL;
1385 11 ▶ if (!RETVAL) XSRETURN_UNDEF;
Branch: 1 branch
BranchTrueFalseTotal
if (!RETVAL) XSRETURN_UNDEF; 0 11 11
1386 11 ▶ if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach();
Branch: 2 branches
BranchTrueFalseTotal
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); 11 0 11
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); 11 0 11
1387 0 else switch (RETVAL.type()) {
1388 0 ▶ case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK));
Branch: 2 branches
BranchTrueFalseTotal
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK)); 0 0 0
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK)); 0 0 0
1389 0 ▶ case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK));
Branch: 2 branches
BranchTrueFalseTotal
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK)); 0 0 0
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK)); 0 0 0
1390 0 case SVt_PVCV:
1391 case SVt_PVIO:
1392 0 ▶ RETVALSV = newRV_noinc(RETVAL.detach());
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = newRV_noinc(RETVAL.detach()); 0 0 0
1393 0 break;
1394 0 default: throw "unknown type of Sv to return";
1395 }
1396 11 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 11 0 11
1397 11 ST(0) = RETVALSV;
1398 }
1399 39 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 11 23 34
1400 11 XSRETURN(1);
1401 34 }); }
1402  
1403  
1404 /* INCLUDE: Returning to 'Framework.xs' from 'CallbackDispatcher.xsi' */
1405  
1406 #ifdef __cplusplus
1407 extern "C" {
1408 #endif
1409  
1410 74 ▶XS_EXTERNAL(boot_XS__Framework) { xs::throw_guard(cv, [=]() mutable
Branch: 1 branch
BranchTrueFalseTotal
XS_EXTERNAL(boot_XS__Framework) { xs::throw_guard(cv, [=]() mutable 37 0 37
1411 {
1412 #if PERL_VERSION_LE(5, 21, 5)
1413 dVAR; dXSARGS;
1414 #else
1415 37 dVAR; dXSBOOTARGSXSAPIVERCHK;
1416 #endif
1417 #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
1418 char* file = __FILE__;
1419 #else
1420 37 const char* file = __FILE__;
1421 #endif
1422  
1423 PERL_UNUSED_VAR(file);
1424  
1425 PERL_UNUSED_VAR(cv); /* -W */
1426 PERL_UNUSED_VAR(items); /* -W */
1427 #if PERL_VERSION_LE(5, 21, 5)
1428 XS_VERSION_BOOTCHECK;
1429 # ifdef XS_APIVERSION_BOOTCHECK
1430 XS_APIVERSION_BOOTCHECK;
1431 # endif
1432 #endif
1433  
1434 37 newXS_deffile("XS::Framework::__at_perl_destroy", XS_XS__Framework___at_perl_destroy);
1435 37 newXS_deffile("XS::Framework::__at_thread_create", XS_XS__Framework___at_thread_create);
1436 37 newXS_deffile("XS::Framework::sv_payload_attach", XS_XS__Framework_sv_payload_attach);
1437 37 newXS_deffile("XS::Framework::sv_payload_exists", XS_XS__Framework_sv_payload_exists);
1438 37 newXS_deffile("XS::Framework::sv_payload", XS_XS__Framework_sv_payload);
1439 37 newXS_deffile("XS::Framework::sv_payload_detach", XS_XS__Framework_sv_payload_detach);
1440 37 newXS_deffile("XS::Framework::rv_payload_attach", XS_XS__Framework_rv_payload_attach);
1441 37 newXS_deffile("XS::Framework::rv_payload_exists", XS_XS__Framework_rv_payload_exists);
1442 37 newXS_deffile("XS::Framework::rv_payload", XS_XS__Framework_rv_payload);
1443 37 newXS_deffile("XS::Framework::rv_payload_detach", XS_XS__Framework_rv_payload_detach);
1444 37 newXS_deffile("XS::Framework::any_payload_attach", XS_XS__Framework_any_payload_attach);
1445 37 newXS_deffile("XS::Framework::any_payload_exists", XS_XS__Framework_any_payload_exists);
1446 37 newXS_deffile("XS::Framework::any_payload", XS_XS__Framework_any_payload);
1447 37 newXS_deffile("XS::Framework::any_payload_detach", XS_XS__Framework_any_payload_detach);
1448 37 newXS_deffile("XS::Framework::obj2hv", XS_XS__Framework_obj2hv);
1449 37 newXS_deffile("XS::Framework::obj2av", XS_XS__Framework_obj2av);
1450 37 newXS_deffile("XS::STL::ErrorCode::new", XS_XS__STL__ErrorCode_new);
1451 37 newXS_deffile("XS::STL::ErrorCode::value", XS_XS__STL__ErrorCode_value);
1452 37 newXS_deffile("XS::STL::ErrorCode::category", XS_XS__STL__ErrorCode_category);
1453 37 newXS_deffile("XS::STL::ErrorCode::message", XS_XS__STL__ErrorCode_message);
1454 37 newXS_deffile("XS::STL::ErrorCode::_op_string", XS_XS__STL__ErrorCode__op_string);
1455 37 newXS_deffile("XS::STL::ErrorCode::_op_bool", XS_XS__STL__ErrorCode__op_bool);
1456 37 newXS_deffile("XS::STL::ErrorCode::_op_eq", XS_XS__STL__ErrorCode__op_eq);
1457 37 newXS_deffile("XS::STL::ErrorCategory::name", XS_XS__STL__ErrorCategory_name);
1458 37 newXS_deffile("XS::STL::ErrorCategory::message", XS_XS__STL__ErrorCategory_message);
1459 37 newXS_deffile("XS::STL::ErrorCategory::_op_string", XS_XS__STL__ErrorCategory__op_string);
1460 37 newXS_deffile("XS::STL::ErrorCategory::_op_eq", XS_XS__STL__ErrorCategory__op_eq);
1461 37 newXS_deffile("XS::ErrorCode::new", XS_XS__ErrorCode_new);
1462 37 newXS_deffile("XS::ErrorCode::value", XS_XS__ErrorCode_value);
1463 37 newXS_deffile("XS::ErrorCode::category", XS_XS__ErrorCode_category);
1464 37 newXS_deffile("XS::ErrorCode::message", XS_XS__ErrorCode_message);
1465 37 newXS_deffile("XS::ErrorCode::code", XS_XS__ErrorCode_code);
1466 37 newXS_deffile("XS::ErrorCode::next", XS_XS__ErrorCode_next);
1467 37 newXS_deffile("XS::ErrorCode::_op_string", XS_XS__ErrorCode__op_string);
1468 37 newXS_deffile("XS::ErrorCode::_op_bool", XS_XS__ErrorCode__op_bool);
1469 37 newXS_deffile("XS::ErrorCode::_op_eq", XS_XS__ErrorCode__op_eq);
1470 37 newXS_deffile("XS::ErrorCode::contains", XS_XS__ErrorCode_contains);
1471 37 newXS_deffile("XS::Framework::CallbackDispatcher::add", XS_XS__Framework__CallbackDispatcher_add);
1472 37 newXS_deffile("XS::Framework::CallbackDispatcher::add_weak", XS_XS__Framework__CallbackDispatcher_add_weak);
1473 37 newXS_deffile("XS::Framework::CallbackDispatcher::prepend", XS_XS__Framework__CallbackDispatcher_prepend);
1474 37 newXS_deffile("XS::Framework::CallbackDispatcher::add_event_listener", XS_XS__Framework__CallbackDispatcher_add_event_listener);
1475 37 newXS_deffile("XS::Framework::CallbackDispatcher::prepend_event_listener", XS_XS__Framework__CallbackDispatcher_prepend_event_listener);
1476 37 newXS_deffile("XS::Framework::CallbackDispatcher::remove", XS_XS__Framework__CallbackDispatcher_remove);
1477 37 newXS_deffile("XS::Framework::CallbackDispatcher::remove_event_listener", XS_XS__Framework__CallbackDispatcher_remove_event_listener);
1478 37 newXS_deffile("XS::Framework::CallbackDispatcher::remove_all", XS_XS__Framework__CallbackDispatcher_remove_all);
1479 37 newXS_deffile("XS::Framework::CallbackDispatcher::has_listeners", XS_XS__Framework__CallbackDispatcher_has_listeners);
1480 37 newXS_deffile("XS::Framework::CallbackDispatcher::call", XS_XS__Framework__CallbackDispatcher_call);
1481  
1482 /* Initialisation Section */
1483  
1484 #line 10 "Framework.xs"
1485 {
1486 xs::typemap::object::init();
1487 }
1488  
1489 #line 8 "./Error.xsi"
1490 {
1491 register_error_constants();
1492 }
1493  
1494 #line 1495 "Framework_xsgen.cc"
1495  
1496 /* End of Initialisation Section */
1497  
1498 #if PERL_VERSION_LE(5, 21, 5)
1499 # if PERL_VERSION_GE(5, 9, 0)
1500 if (PL_unitcheckav)
1501 call_list(PL_scopestack_ix, PL_unitcheckav);
1502 # endif
1503 XSRETURN_YES;
1504 #else
1505 37 Perl_xs_boot_epilog(aTHX_ ax);
1506 #endif
1507 37 }); }
1508  
1509 #ifdef __cplusplus
1510 }
1511 #endif
« t/svapi/io.cc ↑ Summary src/xs/typemap/object.cc »