File Coverage

Framework_xsgen.cc
Criterion Covered Total %
statement 388 552 70.2
branch 225 818 27.5
condition n/a
subroutine n/a
pod n/a
total 613 1370 44.7


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 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
11             #include
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 ExtUtils::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             #line 161 "Framework_xsgen.cc"
161              
162              
163 72           XS_EUPXS(XS_XS__Framework___at_perl_destroy) { xs::throw_guard(cv, [=]()
164             {
165 36           dVAR; dXSARGS;
166 36 50         if (items != 0)
167 0           croak_xs_usage(cv, "");
168             PERL_UNUSED_VAR(ax); /* -Wall */
169 36           SP -= items;
170             {
171             #line 15 "Framework.xs"
172             xs::__call_at_perl_destroy();
173             #line 174 "Framework_xsgen.cc"
174 36           PUTBACK;
175 36           return;
176             }
177 36 50         }); }
178              
179              
180              
181 0           XS_EUPXS(XS_XS__Framework___at_thread_create) { xs::throw_guard(cv, [=]()
182             {
183 0           dVAR; dXSARGS;
184 0 0         if (items != 0)
185 0           croak_xs_usage(cv, "");
186             PERL_UNUSED_VAR(ax); /* -Wall */
187 0           SP -= items;
188             {
189             #line 19 "Framework.xs"
190             xs::__call_at_thread_create();
191             #line 192 "Framework_xsgen.cc"
192 0           PUTBACK;
193 0           return;
194             }
195 0 0         }); }
196              
197              
198              
199 4           XS_EUPXS(XS_XS__Framework_sv_payload_attach) { xs::throw_guard(cv, [=]()
200             {
201 2           dVAR; dXSARGS;
202 2 50         if (items != 2)
203 0           croak_xs_usage(cv, "sv, payload");
204             PERL_UNUSED_VAR(ax); /* -Wall */
205 2           SP -= items;
206             {
207 4 50         Scalar sv = ST(0);
208 2 50         if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
    0          
    0          
    0          
    50          
209 0           ;
210 2           SV* payload = ST(1)
211             ;
212             #line 23 "Framework.xs"
213             sv.payload_detach(Sv::default_marker());
214             sv.payload_attach(payload, Sv::default_marker());
215             #line 216 "Framework_xsgen.cc"
216 2           PUTBACK;
217 4           return;
218             }
219 2 50         }); }
220              
221              
222              
223 10           XS_EUPXS(XS_XS__Framework_sv_payload_exists) { xs::throw_guard(cv, [=]()
224             {
225 5           dVAR; dXSARGS;
226 5 50         if (items != 1)
227 0           croak_xs_usage(cv, "sv");
228             {
229             bool RETVAL;
230 10 50         Scalar sv = ST(0);
231 5 50         if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
    0          
    0          
    0          
    50          
232 0           ;
233             #line 28 "Framework.xs"
234             RETVAL = sv.payload_exists(Sv::default_marker());
235             #line 236 "Framework_xsgen.cc"
236 5 100         ST(0) = boolSV(RETVAL);
237             }
238 5           XSRETURN(1);
239 5 50         }); }
240              
241              
242              
243 6           XS_EUPXS(XS_XS__Framework_sv_payload) { xs::throw_guard(cv, [=]()
244             {
245 3           dVAR; dXSARGS;
246 3 50         if (items != 1)
247 0           croak_xs_usage(cv, "sv");
248             PERL_UNUSED_VAR(ax); /* -Wall */
249 3           SP -= items;
250             {
251 6 50         Scalar sv = ST(0);
252 3 50         if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
    0          
    0          
    0          
    50          
253 0           ;
254             #line 32 "Framework.xs"
255             SV* ret = sv.payload(Sv::default_marker()).obj;
256             if (!ret) XSRETURN_UNDEF;
257             ST(0) = ret;
258             XSRETURN(1);
259             #line 260 "Framework_xsgen.cc"
260             PUTBACK;
261             return;
262             }
263 3 50         }); }
264              
265              
266              
267 2           XS_EUPXS(XS_XS__Framework_sv_payload_detach) { xs::throw_guard(cv, [=]()
268             {
269 1           dVAR; dXSARGS;
270 1 50         if (items != 1)
271 0           croak_xs_usage(cv, "sv");
272             {
273             int RETVAL;
274 1 50         dXSTARG;
    0          
275 2 50         Scalar sv = ST(0);
276 1 50         if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value"
    0          
    0          
    0          
    50          
277 0           ;
278             #line 39 "Framework.xs"
279             RETVAL = sv.payload_detach(Sv::default_marker());
280             #line 281 "Framework_xsgen.cc"
281 1 50         XSprePUSH; PUSHi((IV)RETVAL);
    50          
282             }
283 1           XSRETURN(1);
284 1 50         }); }
285              
286              
287              
288 4           XS_EUPXS(XS_XS__Framework_rv_payload_attach) { xs::throw_guard(cv, [=]()
289             {
290 2           dVAR; dXSARGS;
291 2 50         if (items != 2)
292 0           croak_xs_usage(cv, "rv, payload");
293             PERL_UNUSED_VAR(ax); /* -Wall */
294 2           SP -= items;
295             {
296 4 50         Ref rv = ST(0);
297 2 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
298 0           ;
299 2           SV* payload = ST(1)
300             ;
301             #line 43 "Framework.xs"
302             if (!rv) throw "argument is not a reference";
303             rv.value().payload_detach(Sv::default_marker());
304             rv.value().payload_attach(payload, Sv::default_marker());
305             #line 306 "Framework_xsgen.cc"
306 2           PUTBACK;
307 4           return;
308             }
309 2 50         }); }
310              
311              
312              
313 10           XS_EUPXS(XS_XS__Framework_rv_payload_exists) { xs::throw_guard(cv, [=]()
314             {
315 5           dVAR; dXSARGS;
316 5 50         if (items != 1)
317 0           croak_xs_usage(cv, "rv");
318             {
319             bool RETVAL;
320 10 50         Ref rv = ST(0);
321 5 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
322 0           ;
323             #line 49 "Framework.xs"
324             if (!rv) throw "argument is not a reference";
325             RETVAL = rv.value().payload_exists(Sv::default_marker());
326             #line 327 "Framework_xsgen.cc"
327 5 100         ST(0) = boolSV(RETVAL);
328             }
329 5           XSRETURN(1);
330 5 50         }); }
331              
332              
333              
334 6           XS_EUPXS(XS_XS__Framework_rv_payload) { xs::throw_guard(cv, [=]()
335             {
336 3           dVAR; dXSARGS;
337 3 50         if (items != 1)
338 0           croak_xs_usage(cv, "rv");
339             PERL_UNUSED_VAR(ax); /* -Wall */
340 3           SP -= items;
341             {
342 6 50         Ref rv = ST(0);
343 3 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
344 0           ;
345             #line 54 "Framework.xs"
346             if (!rv) throw "argument is not a reference";
347             SV* ret = rv.value().payload(Sv::default_marker()).obj;
348             if (!ret) XSRETURN_UNDEF;
349             ST(0) = ret;
350             XSRETURN(1);
351             #line 352 "Framework_xsgen.cc"
352             PUTBACK;
353             return;
354             }
355 3 50         }); }
356              
357              
358              
359 2           XS_EUPXS(XS_XS__Framework_rv_payload_detach) { xs::throw_guard(cv, [=]()
360             {
361 1           dVAR; dXSARGS;
362 1 50         if (items != 1)
363 0           croak_xs_usage(cv, "rv");
364             {
365             int RETVAL;
366 1 50         dXSTARG;
    0          
367 2 50         Ref rv = ST(0);
368 1 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
369 0           ;
370             #line 62 "Framework.xs"
371             if (!rv) throw "argument is not a reference";
372             RETVAL = rv.value().payload_detach(Sv::default_marker());
373             #line 374 "Framework_xsgen.cc"
374 1 50         XSprePUSH; PUSHi((IV)RETVAL);
    50          
375             }
376 1           XSRETURN(1);
377 1 50         }); }
378              
379              
380              
381 8           XS_EUPXS(XS_XS__Framework_any_payload_attach) { xs::throw_guard(cv, [=]()
382             {
383 4           dVAR; dXSARGS;
384 4 50         if (items != 2)
385 0           croak_xs_usage(cv, "sv, payload");
386             PERL_UNUSED_VAR(ax); /* -Wall */
387 4           SP -= items;
388             {
389 8           Sv sv = ST(0)
390             ;
391 4           SV* payload = ST(1)
392             ;
393             #line 67 "Framework.xs"
394             if (sv.is_ref()) sv = Ref(sv).value();
395             sv.payload_detach(Sv::default_marker());
396             sv.payload_attach(payload, Sv::default_marker());
397             #line 398 "Framework_xsgen.cc"
398 4           PUTBACK;
399 8           return;
400             }
401 4 50         }); }
402              
403              
404              
405 20           XS_EUPXS(XS_XS__Framework_any_payload_exists) { xs::throw_guard(cv, [=]()
406             {
407 10           dVAR; dXSARGS;
408 10 50         if (items != 1)
409 0           croak_xs_usage(cv, "sv");
410             {
411             bool RETVAL;
412 20           Sv sv = ST(0)
413             ;
414             #line 73 "Framework.xs"
415             if (sv.is_ref()) sv = Ref(sv).value();
416             RETVAL = sv.payload_exists(Sv::default_marker());
417             #line 418 "Framework_xsgen.cc"
418 10 100         ST(0) = boolSV(RETVAL);
419             }
420 10           XSRETURN(1);
421 10 50         }); }
422              
423              
424              
425 6           XS_EUPXS(XS_XS__Framework_any_payload) { xs::throw_guard(cv, [=]()
426             {
427 3           dVAR; dXSARGS;
428 3 50         if (items != 1)
429 0           croak_xs_usage(cv, "sv");
430             {
431             SV * RETVAL;
432 3           Sv sv = ST(0)
433             ;
434             #line 78 "Framework.xs"
435             if (sv.is_ref()) sv = Ref(sv).value();
436             SV* ret = sv.payload(Sv::default_marker()).obj;
437             if (!ret) XSRETURN_UNDEF;
438             ST(0) = ret;
439             XSRETURN(1);
440             #line 441 "Framework_xsgen.cc"
441             RETVAL = sv_2mortal(RETVAL);
442             ST(0) = RETVAL;
443             }
444 3           XSRETURN(1);
445 3 50         }); }
446              
447              
448              
449 4           XS_EUPXS(XS_XS__Framework_any_payload_detach) { xs::throw_guard(cv, [=]()
450             {
451 2           dVAR; dXSARGS;
452 2 50         if (items != 1)
453 0           croak_xs_usage(cv, "sv");
454             {
455             int RETVAL;
456 2 50         dXSTARG;
    0          
457 4           Sv sv = ST(0)
458             ;
459             #line 86 "Framework.xs"
460             if (sv.is_ref()) sv = Ref(sv).value();
461             RETVAL = sv.payload_detach(Sv::default_marker());
462             #line 463 "Framework_xsgen.cc"
463 2 50         XSprePUSH; PUSHi((IV)RETVAL);
    50          
464             }
465 2           XSRETURN(1);
466 2 50         }); }
467              
468              
469              
470 12           XS_EUPXS(XS_XS__Framework_obj2hv) { xs::throw_guard(cv, [=]()
471             {
472 6           dVAR; dXSARGS;
473 6 50         if (items != 1)
474 0           croak_xs_usage(cv, "rv");
475             PERL_UNUSED_VAR(ax); /* -Wall */
476 6           SP -= items;
477             {
478 12 50         Ref rv = ST(0);
479 6 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
480 0           ;
481             #line 91 "Framework.xs"
482             if (!rv) throw "argument is not a reference";
483             auto sv = rv.value();
484             if (SvOK(sv)) throw "only references to undefs can be upgraded";
485             sv.upgrade(SVt_PVHV);
486             #line 487 "Framework_xsgen.cc"
487 4           PUTBACK;
488 8           return;
489             }
490 6 50         }); }
491              
492              
493              
494 4           XS_EUPXS(XS_XS__Framework_obj2av) { xs::throw_guard(cv, [=]()
495             {
496 2           dVAR; dXSARGS;
497 2 50         if (items != 1)
498 0           croak_xs_usage(cv, "rv");
499             PERL_UNUSED_VAR(ax); /* -Wall */
500 2           SP -= items;
501             {
502 4 50         Ref rv = ST(0);
503 2 50         if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value"
    0          
    0          
    0          
    50          
504 0           ;
505             #line 98 "Framework.xs"
506             if (!rv) throw "argument is not a reference";
507             auto sv = rv.value();
508             if (SvOK(sv)) throw "only references to undefs can be upgraded";
509             sv.upgrade(SVt_PVAV);
510             #line 511 "Framework_xsgen.cc"
511 1           PUTBACK;
512 2           return;
513             }
514 2 50         }); }
515              
516              
517             /* INCLUDE: Including 'Error.xsi' from 'Framework.xs' */
518              
519             void register_error_constants(); // regerror.cc, because fucking xsubpp removes preprocessor directives
520              
521              
522 2           XS_EUPXS(XS_XS__STL__ErrorCode_new) { xs::throw_guard(cv, [=]()
523             {
524 1           dVAR; dXSARGS;
525 1 50         if (items != 3)
526 0           croak_xs_usage(cv, "SV*, ec, category");
527             {
528 1           std::error_code RETVAL;
529 1 50         int ec = (int)SvIV(ST(1))
    0          
530             ;
531 1 50         const std::error_category* category = xs::in(ST(2));
532             ;
533             #line 13 "./Error.xsi"
534             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
535             if (!category) throw "category required";
536             RETVAL = std::error_code(ec, *category);
537             #line 538 "Framework_xsgen.cc"
538             {
539             SV * RETVALSV;
540 1 50         RETVALSV = xs::out(RETVAL, PROTO).detach();
541 1 50         RETVALSV = sv_2mortal(RETVALSV);
542 1           ST(0) = RETVALSV;
543             }
544             }
545 1           XSRETURN(1);
546 1 50         }); }
547              
548              
549              
550 252           XS_EUPXS(XS_XS__STL__ErrorCode_value) { xs::throw_guard(cv, [=]()
551             {
552 126           dVAR; dXSARGS;
553 126 50         if (items != 1)
554 0           croak_xs_usage(cv, "ec");
555             {
556             int RETVAL;
557 126 50         dXSTARG;
    0          
558 126 50         std::error_code ec = xs::in(ST(0));
559             ;
560             #line 18 "./Error.xsi"
561             RETVAL = ec.value();
562             #line 563 "Framework_xsgen.cc"
563 126 100         XSprePUSH; PUSHi((IV)RETVAL);
    50          
564             }
565 126           XSRETURN(1);
566 126 50         }); }
567              
568              
569              
570 4           XS_EUPXS(XS_XS__STL__ErrorCode_category) { xs::throw_guard(cv, [=]()
571             {
572 2           dVAR; dXSARGS;
573 2 50         if (items != 1)
574 0           croak_xs_usage(cv, "ec");
575             {
576             const std::error_category * RETVAL;
577 2 50         std::error_code ec = xs::in(ST(0));
578             ;
579             #line 22 "./Error.xsi"
580             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
581             RETVAL = &ec.category();
582             #line 583 "Framework_xsgen.cc"
583             {
584             SV * RETVALSV;
585 2 50         RETVALSV = xs::out(RETVAL, PROTO).detach();
586 2 50         RETVALSV = sv_2mortal(RETVALSV);
587 2           ST(0) = RETVALSV;
588             }
589             }
590 2           XSRETURN(1);
591 2 50         }); }
592              
593              
594              
595 4           XS_EUPXS(XS_XS__STL__ErrorCode_message) { xs::throw_guard(cv, [=]()
596             {
597 2           dVAR; dXSARGS;
598 2 50         if (items != 1)
599 0           croak_xs_usage(cv, "ec");
600             {
601 4           std::string RETVAL;
602 2 50         dXSTARG;
    0          
603 2 50         std::error_code ec = xs::in(ST(0));
604             ;
605             #line 26 "./Error.xsi"
606             RETVAL = ec.message();
607             #line 608 "Framework_xsgen.cc"
608 2 50         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    50          
    0          
609             }
610 2           XSRETURN(1);
611 2 50         }); }
612              
613              
614              
615 0           XS_EUPXS(XS_XS__STL__ErrorCode__op_string) { xs::throw_guard(cv, [=]()
616             {
617 0           dVAR; dXSARGS;
618 0 0         if (items < 1)
619 0           croak_xs_usage(cv, "ec, ...");
620             {
621 0           std::string RETVAL;
622 0 0         dXSTARG;
    0          
623 0 0         std::error_code ec = xs::in(ST(0));
624             ;
625             #line 30 "./Error.xsi"
626             RETVAL = ec.message();
627             RETVAL += " (";
628             RETVAL += std::to_string(ec.value());
629             RETVAL += ":";
630             RETVAL += ec.category().name();
631             RETVAL += ")";
632             #line 633 "Framework_xsgen.cc"
633 0 0         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    0          
    0          
634             }
635 0           XSRETURN(1);
636 0 0         }); }
637              
638              
639              
640 0           XS_EUPXS(XS_XS__STL__ErrorCode__op_bool) { xs::throw_guard(cv, [=]()
641             {
642 0           dVAR; dXSARGS;
643 0 0         if (items < 1)
644 0           croak_xs_usage(cv, "ec, ...");
645             {
646             bool RETVAL;
647 0 0         std::error_code ec = xs::in(ST(0));
648             ;
649             #line 39 "./Error.xsi"
650             RETVAL = ec.value();
651             #line 652 "Framework_xsgen.cc"
652 0 0         ST(0) = boolSV(RETVAL);
653             }
654 0           XSRETURN(1);
655 0 0         }); }
656              
657              
658              
659 128           XS_EUPXS(XS_XS__STL__ErrorCode__op_eq) { xs::throw_guard(cv, [=]()
660             {
661 64           dVAR; dXSARGS;
662 64 50         if (items < 2)
663 0           croak_xs_usage(cv, "ec1, sv_ec2, ...");
664             {
665             bool RETVAL;
666 64 50         std::error_code ec1 = xs::in(ST(0));
667             ;
668 128           Sv sv_ec2 = ST(1)
669             ;
670             #line 43 "./Error.xsi"
671             if (sv_ec2.is_object_ref()) {
672             Object ec2 = sv_ec2;
673             auto class_name = ec2.stash().name();
674             if (class_name == "XS::ErrorCode") {
675             RETVAL = ec1 == xs::in(sv_ec2);
676             } else if (class_name == "XS::STL::ErrorCode") {
677             RETVAL = ec1 == xs::in(sv_ec2);
678             } else {
679             RETVAL = false;
680             }
681             } else if (SvIOK(sv_ec2)) {
682             int code = Simple(sv_ec2);
683             RETVAL = ec1.value() == code;
684             } else {
685             RETVAL = false;
686             }
687             #line 688 "Framework_xsgen.cc"
688 64 50         ST(0) = boolSV(RETVAL);
689             }
690 64           XSRETURN(1);
691 64 50         }); }
692              
693              
694              
695 2           XS_EUPXS(XS_XS__STL__ErrorCode__op_and) { xs::throw_guard(cv, [=]()
696             {
697 1           dVAR; dXSARGS;
698 1 50         if (items < 2)
699 0           croak_xs_usage(cv, "e1, e2, ...");
700             {
701             bool RETVAL;
702 1 50         std::error_code e1 = xs::in(ST(0));
703             ;
704 1 50         std::error_code e2 = xs::in(ST(1));
705             ;
706             #line 62 "./Error.xsi"
707             RETVAL = (e1 == e2);
708             #line 709 "Framework_xsgen.cc"
709 1 50         ST(0) = boolSV(RETVAL);
710             }
711 1           XSRETURN(1);
712 1 50         }); }
713              
714              
715              
716 6           XS_EUPXS(XS_XS__STL__ErrorCategory_name) { xs::throw_guard(cv, [=]()
717             {
718 3           dVAR; dXSARGS;
719 3 50         if (items != 1)
720 0           croak_xs_usage(cv, "THIS");
721             {
722             const char * RETVAL;
723 3 50         dXSTARG;
    0          
724 3 50         const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
725             ;
726             #line 68 "./Error.xsi"
727             RETVAL = THIS->name();
728             #line 729 "Framework_xsgen.cc"
729 3 50         sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    50          
    0          
730             }
731 3           XSRETURN(1);
732 3 50         }); }
733              
734              
735              
736 0           XS_EUPXS(XS_XS__STL__ErrorCategory_message) { xs::throw_guard(cv, [=]()
737             {
738 0           dVAR; dXSARGS;
739 0 0         if (items != 2)
740 0           croak_xs_usage(cv, "THIS, ec");
741             {
742 0           std::string RETVAL;
743 0 0         dXSTARG;
    0          
744 0 0         const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    0          
    0          
    0          
745             ;
746 0 0         int ec = (int)SvIV(ST(1))
    0          
747             ;
748             #line 70 "./Error.xsi"
749             RETVAL = THIS->message(ec);
750             #line 751 "Framework_xsgen.cc"
751 0 0         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    0          
    0          
752             }
753 0           XSRETURN(1);
754 0 0         }); }
755              
756              
757              
758 0           XS_EUPXS(XS_XS__STL__ErrorCategory__op_string) { xs::throw_guard(cv, [=]()
759             {
760 0           dVAR; dXSARGS;
761 0 0         if (items < 1)
762 0           croak_xs_usage(cv, "THIS, ...");
763             {
764 0           std::string RETVAL;
765 0 0         dXSTARG;
    0          
766 0 0         const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    0          
    0          
    0          
767             ;
768             #line 73 "./Error.xsi"
769             RETVAL = THIS->name();
770             #line 771 "Framework_xsgen.cc"
771 0 0         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    0          
    0          
772             }
773 0           XSRETURN(1);
774 0 0         }); }
775              
776              
777              
778 6           XS_EUPXS(XS_XS__STL__ErrorCategory__op_eq) { xs::throw_guard(cv, [=]()
779             {
780 3           dVAR; dXSARGS;
781 3 50         if (items < 2)
782 0           croak_xs_usage(cv, "THIS, oth, ...");
783             {
784             bool RETVAL;
785 3 50         const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
786             ;
787 3 50         const std::error_category* oth = xs::in(ST(1));
788             ;
789             #line 77 "./Error.xsi"
790             RETVAL = *THIS == *oth;
791             #line 792 "Framework_xsgen.cc"
792 3 50         ST(0) = boolSV(RETVAL);
793             }
794 3           XSRETURN(1);
795 3 50         }); }
796              
797              
798              
799 0           XS_EUPXS(XS_XS__ErrorCode_new) { xs::throw_guard(cv, [=]()
800             {
801 0           dVAR; dXSARGS;
802 0 0         if (items < 2 || items > 3)
    0          
803 0           croak_xs_usage(cv, "SV*, c, next= ErrorCode()");
804             {
805 0           ErrorCode RETVAL;
806 0 0         std::error_code c = xs::in(ST(1));
807             ;
808 0           ErrorCode next;
809              
810 0 0         if (items < 3)
811 0           next = ErrorCode();
812             else {
813 0 0         next = xs::in(ST(2));
814             ;
815             }
816             #line 84 "./Error.xsi"
817             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
818             if (next) RETVAL = ErrorCode(c, next);
819             else RETVAL = ErrorCode(c);
820             #line 821 "Framework_xsgen.cc"
821             {
822             SV * RETVALSV;
823 0 0         RETVALSV = xs::out(RETVAL, PROTO).detach();
824 0 0         RETVALSV = sv_2mortal(RETVALSV);
825 0           ST(0) = RETVALSV;
826             }
827             }
828 0           XSRETURN(1);
829 0 0         }); }
830              
831              
832              
833 4           XS_EUPXS(XS_XS__ErrorCode_value) { xs::throw_guard(cv, [=]()
834             {
835 2           dVAR; dXSARGS;
836 2 50         if (items != 1)
837 0           croak_xs_usage(cv, "ec");
838             {
839             int RETVAL;
840 2 50         dXSTARG;
    0          
841 4 50         ErrorCode ec = xs::in(ST(0));
842             ;
843             #line 89 "./Error.xsi"
844             RETVAL = ec.value();
845             #line 846 "Framework_xsgen.cc"
846 2 50         XSprePUSH; PUSHi((IV)RETVAL);
    50          
847             }
848 2           XSRETURN(1);
849 2 50         }); }
850              
851              
852              
853 2           XS_EUPXS(XS_XS__ErrorCode_category) { xs::throw_guard(cv, [=]()
854             {
855 1           dVAR; dXSARGS;
856 1 50         if (items != 1)
857 0           croak_xs_usage(cv, "ec");
858             {
859             const std::error_category * RETVAL;
860 2 50         ErrorCode ec = xs::in(ST(0));
861             ;
862             #line 93 "./Error.xsi"
863             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
864             RETVAL = &ec.category();
865             #line 866 "Framework_xsgen.cc"
866             {
867             SV * RETVALSV;
868 1 50         RETVALSV = xs::out(RETVAL, PROTO).detach();
869 1 50         RETVALSV = sv_2mortal(RETVALSV);
870 1           ST(0) = RETVALSV;
871             }
872             }
873 1           XSRETURN(1);
874 1 50         }); }
875              
876              
877              
878 2           XS_EUPXS(XS_XS__ErrorCode_message) { xs::throw_guard(cv, [=]()
879             {
880 1           dVAR; dXSARGS;
881 1 50         if (items != 1)
882 0           croak_xs_usage(cv, "ec");
883             {
884 2           std::string RETVAL;
885 1 50         dXSTARG;
    0          
886 2 50         ErrorCode ec = xs::in(ST(0));
887             ;
888             #line 97 "./Error.xsi"
889             RETVAL = ec.message();
890             #line 891 "Framework_xsgen.cc"
891 1 50         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    50          
    0          
892             }
893 1           XSRETURN(1);
894 1 50         }); }
895              
896              
897              
898 2           XS_EUPXS(XS_XS__ErrorCode_code) { xs::throw_guard(cv, [=]()
899             {
900 1           dVAR; dXSARGS;
901 1 50         if (items != 1)
902 0           croak_xs_usage(cv, "ec");
903             {
904 1           std::error_code RETVAL;
905 2 50         ErrorCode ec = xs::in(ST(0));
906             ;
907             #line 101 "./Error.xsi"
908             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
909             RETVAL = ec.code();
910             #line 911 "Framework_xsgen.cc"
911             {
912             SV * RETVALSV;
913 1 50         RETVALSV = xs::out(RETVAL, PROTO).detach();
914 1 50         RETVALSV = sv_2mortal(RETVALSV);
915 1           ST(0) = RETVALSV;
916             }
917             }
918 1           XSRETURN(1);
919 1 50         }); }
920              
921              
922              
923 2           XS_EUPXS(XS_XS__ErrorCode_next) { xs::throw_guard(cv, [=]()
924             {
925 1           dVAR; dXSARGS;
926 1 50         if (items != 1)
927 0           croak_xs_usage(cv, "ec");
928             {
929 2           ErrorCode RETVAL;
930 2 50         ErrorCode ec = xs::in(ST(0));
931             ;
932             #line 105 "./Error.xsi"
933             xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
934             RETVAL = ec.next();
935             #line 936 "Framework_xsgen.cc"
936             {
937             SV * RETVALSV;
938 1 50         RETVALSV = xs::out(RETVAL, PROTO).detach();
939 1 50         RETVALSV = sv_2mortal(RETVALSV);
940 1           ST(0) = RETVALSV;
941             }
942             }
943 1           XSRETURN(1);
944 1 50         }); }
945              
946              
947              
948 0           XS_EUPXS(XS_XS__ErrorCode__op_string) { xs::throw_guard(cv, [=]()
949             {
950 0           dVAR; dXSARGS;
951 0 0         if (items < 1)
952 0           croak_xs_usage(cv, "ec, ...");
953             {
954 0           std::string RETVAL;
955 0 0         dXSTARG;
    0          
956 0 0         ErrorCode ec = xs::in(ST(0));
    0          
957             ;
958             #line 109 "./Error.xsi"
959             if (!ec) XSRETURN_UNDEF;
960             RETVAL = ec.what();
961             #line 962 "Framework_xsgen.cc"
962 0 0         XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length());
    0          
    0          
    0          
963             }
964 0           XSRETURN(1);
965 0 0         }); }
966              
967              
968              
969 0           XS_EUPXS(XS_XS__ErrorCode__op_bool) { xs::throw_guard(cv, [=]()
970             {
971 0           dVAR; dXSARGS;
972 0 0         if (items < 1)
973 0           croak_xs_usage(cv, "ec, ...");
974             {
975             bool RETVAL;
976 0 0         ErrorCode ec = xs::in(ST(0));
977             ;
978             #line 114 "./Error.xsi"
979             RETVAL = ec.value();
980             #line 981 "Framework_xsgen.cc"
981 0 0         ST(0) = boolSV(RETVAL);
982             }
983 0           XSRETURN(1);
984 0 0         }); }
985              
986              
987              
988 10           XS_EUPXS(XS_XS__ErrorCode__op_eq) { xs::throw_guard(cv, [=]()
989             {
990 5           dVAR; dXSARGS;
991 5 50         if (items < 2)
992 0           croak_xs_usage(cv, "ec1, sv_ec2, ...");
993             {
994             bool RETVAL;
995 10 50         ErrorCode ec1 = xs::in(ST(0));
996             ;
997 10           Sv sv_ec2 = ST(1)
998             ;
999             #line 118 "./Error.xsi"
1000             if (sv_ec2.is_object_ref()) {
1001             Object ec2 = sv_ec2;
1002             auto class_name = ec2.stash().name();
1003             if (class_name == "XS::ErrorCode") {
1004             RETVAL = ec1 == xs::in(sv_ec2);
1005             } else if (class_name == "XS::STL::ErrorCode") {
1006             RETVAL = ec1 == xs::in(sv_ec2);
1007             } else {
1008             RETVAL = false;
1009             }
1010             } else if (SvIOK(sv_ec2)) {
1011             int code = Simple(sv_ec2);
1012             RETVAL = ec1.value() == code;
1013             } else {
1014             RETVAL = false;
1015             }
1016             #line 1017 "Framework_xsgen.cc"
1017 5 50         ST(0) = boolSV(RETVAL);
1018             }
1019 5           XSRETURN(1);
1020 5 50         }); }
1021              
1022              
1023              
1024 2           XS_EUPXS(XS_XS__ErrorCode_contains) { xs::throw_guard(cv, [=]()
1025             {
1026 1           dVAR; dXSARGS;
1027 1 50         if (items != 2)
1028 0           croak_xs_usage(cv, "ec, c");
1029             {
1030             bool RETVAL;
1031 2 50         ErrorCode ec = xs::in(ST(0));
1032             ;
1033 1 50         std::error_code c = xs::in(ST(1));
1034             ;
1035             #line 137 "./Error.xsi"
1036             RETVAL = ec.contains(c);
1037             #line 1038 "Framework_xsgen.cc"
1038 1 50         ST(0) = boolSV(RETVAL);
1039             }
1040 1           XSRETURN(1);
1041 1 50         }); }
1042              
1043              
1044              
1045 6           XS_EUPXS(XS_XS__ErrorCode__op_and) { xs::throw_guard(cv, [=]()
1046             {
1047 3           dVAR; dXSARGS;
1048 3 50         if (items < 2)
1049 0           croak_xs_usage(cv, "ec, c, ...");
1050             {
1051             bool RETVAL;
1052 6 50         ErrorCode ec = xs::in(ST(0));
1053             ;
1054 3 50         std::error_code c = xs::in(ST(1));
1055             ;
1056             #line 141 "./Error.xsi"
1057             RETVAL = ec.contains(c);
1058             #line 1059 "Framework_xsgen.cc"
1059 3 100         ST(0) = boolSV(RETVAL);
1060             }
1061 3           XSRETURN(1);
1062 3 50         }); }
1063              
1064              
1065             /* INCLUDE: Returning to 'Framework.xs' from 'Error.xsi' */
1066              
1067              
1068             /* INCLUDE: Including 'CallbackDispatcher.xsi' from 'Framework.xs' */
1069              
1070              
1071              
1072 24           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add) { xs::throw_guard(cv, [=]()
1073             {
1074 12           dVAR; dXSARGS;
1075 12 50         if (items < 2 || items > 3)
    50          
1076 0           croak_xs_usage(cv, "THIS, cv, back= false");
1077             PERL_UNUSED_VAR(ax); /* -Wall */
1078 12           SP -= items;
1079             {
1080 12 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1081             ;
1082 24 50         Sub cv = ST(1);
1083 12 50         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    50          
1084 0           ;
1085             bool back;
1086              
1087 12 50         if (items < 3)
1088 12           back = false;
1089             else {
1090 0 0         back = (bool)SvTRUE(ST(2))
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
    0          
1091 0           ;
1092             }
1093             #line 4 "./CallbackDispatcher.xsi"
1094             THIS->add(cv, back);
1095             #line 1096 "Framework_xsgen.cc"
1096 12           PUTBACK;
1097 24           return;
1098             }
1099 12 50         }); }
1100              
1101              
1102              
1103 0           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_back) { xs::throw_guard(cv, [=]()
1104             {
1105 0           dVAR; dXSARGS;
1106 0 0         if (items != 2)
1107 0           croak_xs_usage(cv, "THIS, cv");
1108             PERL_UNUSED_VAR(ax); /* -Wall */
1109 0           SP -= items;
1110             {
1111 0 0         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    0          
    0          
    0          
1112             ;
1113 0 0         Sub cv = ST(1);
1114 0 0         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    0          
1115 0           ;
1116             #line 6 "./CallbackDispatcher.xsi"
1117             THIS->add_back(cv);
1118             #line 1119 "Framework_xsgen.cc"
1119 0           PUTBACK;
1120 0           return;
1121             }
1122 0 0         }); }
1123              
1124              
1125              
1126 48           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener) { xs::throw_guard(cv, [=]()
1127             {
1128 24           dVAR; dXSARGS;
1129 24 50         if (items < 2 || items > 3)
    50          
1130 0           croak_xs_usage(cv, "THIS, cv, back= false");
1131             PERL_UNUSED_VAR(ax); /* -Wall */
1132 24           SP -= items;
1133             {
1134 24 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1135             ;
1136 48 50         Sub cv = ST(1);
1137 24 50         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    50          
1138 0           ;
1139             bool back;
1140              
1141 24 100         if (items < 3)
1142 22           back = false;
1143             else {
1144 2 50         back = (bool)SvTRUE(ST(2))
    50          
    0          
    0          
    50          
    0          
    0          
    50          
    0          
    0          
    0          
    0          
    50          
    50          
    50          
    0          
    0          
    0          
    0          
1145 2           ;
1146             }
1147             #line 8 "./CallbackDispatcher.xsi"
1148             THIS->add_event_listener(cv, back);
1149             #line 1150 "Framework_xsgen.cc"
1150 24           PUTBACK;
1151 48           return;
1152             }
1153 24 50         }); }
1154              
1155              
1156              
1157 0           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener_back) { xs::throw_guard(cv, [=]()
1158             {
1159 0           dVAR; dXSARGS;
1160 0 0         if (items != 2)
1161 0           croak_xs_usage(cv, "THIS, cv");
1162             PERL_UNUSED_VAR(ax); /* -Wall */
1163 0           SP -= items;
1164             {
1165 0 0         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    0          
    0          
    0          
1166             ;
1167 0 0         Sub cv = ST(1);
1168 0 0         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    0          
1169 0           ;
1170             #line 10 "./CallbackDispatcher.xsi"
1171             THIS->add_event_listener_back(cv);
1172             #line 1173 "Framework_xsgen.cc"
1173 0           PUTBACK;
1174 0           return;
1175             }
1176 0 0         }); }
1177              
1178              
1179              
1180 4           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove) { xs::throw_guard(cv, [=]()
1181             {
1182 2           dVAR; dXSARGS;
1183 2 50         if (items != 2)
1184 0           croak_xs_usage(cv, "THIS, cv");
1185             PERL_UNUSED_VAR(ax); /* -Wall */
1186 2           SP -= items;
1187             {
1188 2 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1189             ;
1190 4 50         Sub cv = ST(1);
1191 2 50         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    50          
1192 0           ;
1193             #line 12 "./CallbackDispatcher.xsi"
1194             THIS->remove(cv);
1195             #line 1196 "Framework_xsgen.cc"
1196 2           PUTBACK;
1197 4           return;
1198             }
1199 2 50         }); }
1200              
1201              
1202              
1203 4           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_event_listener) { xs::throw_guard(cv, [=]()
1204             {
1205 2           dVAR; dXSARGS;
1206 2 50         if (items != 2)
1207 0           croak_xs_usage(cv, "THIS, cv");
1208             PERL_UNUSED_VAR(ax); /* -Wall */
1209 2           SP -= items;
1210             {
1211 2 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1212             ;
1213 4 50         Sub cv = ST(1);
1214 2 50         if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference"
    0          
    0          
    0          
    50          
1215 0           ;
1216             #line 14 "./CallbackDispatcher.xsi"
1217             THIS->remove_event_listener(cv);
1218             #line 1219 "Framework_xsgen.cc"
1219 2           PUTBACK;
1220 4           return;
1221             }
1222 2 50         }); }
1223              
1224              
1225              
1226 44           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_all) { xs::throw_guard(cv, [=]()
1227             {
1228 22           dVAR; dXSARGS;
1229 22 50         if (items != 1)
1230 0           croak_xs_usage(cv, "THIS");
1231             PERL_UNUSED_VAR(ax); /* -Wall */
1232 22           SP -= items;
1233             {
1234 22 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    0          
    0          
1235             ;
1236             #line 16 "./CallbackDispatcher.xsi"
1237             THIS->remove_all();
1238             #line 1239 "Framework_xsgen.cc"
1239 22           PUTBACK;
1240 22           return;
1241             }
1242 22 50         }); }
1243              
1244              
1245              
1246 16           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_has_listeners) { xs::throw_guard(cv, [=]()
1247             {
1248 8           dVAR; dXSARGS;
1249 8 50         if (items != 1)
1250 0           croak_xs_usage(cv, "THIS");
1251             {
1252             bool RETVAL;
1253 8 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1254             ;
1255             #line 18 "./CallbackDispatcher.xsi"
1256             RETVAL = THIS->has_listeners();
1257             #line 1258 "Framework_xsgen.cc"
1258 8 100         ST(0) = boolSV(RETVAL);
1259             }
1260 8           XSRETURN(1);
1261 8 50         }); }
1262              
1263              
1264              
1265 62           XS_EUPXS(XS_XS__Framework__CallbackDispatcher_call) { xs::throw_guard(cv, [=]()
1266             {
1267 31           dVAR; dXSARGS;
1268 31 50         if (items < 1)
1269 0           croak_xs_usage(cv, "THIS, ...");
1270             {
1271 47           Sv RETVAL;
1272 31 50         XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
    50          
    0          
    0          
1273             ;
1274             #line 21 "./CallbackDispatcher.xsi"
1275             RETVAL = THIS->call(&ST(1), items - 1);
1276             if (!RETVAL) XSRETURN_EMPTY;
1277             #line 1278 "Framework_xsgen.cc"
1278             {
1279             SV * RETVALSV;
1280 11           RETVALSV = NULL;
1281 11 50         if (!RETVAL) XSRETURN_UNDEF;
1282 11 50         if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach();
    50          
1283 0           else switch (RETVAL.type()) {
1284 0 0         case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK));
    0          
1285 0 0         case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK));
    0          
1286             case SVt_PVCV:
1287             case SVt_PVIO:
1288 0 0         RETVALSV = newRV_noinc(RETVAL.detach());
1289 0           break;
1290 0           default: throw "unknown type of Sv to return";
1291             }
1292 11 50         RETVALSV = sv_2mortal(RETVALSV);
1293 26 100         ST(0) = RETVALSV;
1294             }
1295             }
1296 26           XSRETURN(1);
1297 31 50         }); }
1298              
1299              
1300             /* INCLUDE: Returning to 'Framework.xs' from 'CallbackDispatcher.xsi' */
1301              
1302             #ifdef __cplusplus
1303             extern "C"
1304             #endif
1305              
1306 72           XS_EXTERNAL(boot_XS__Framework) { xs::throw_guard(cv, [=]() mutable
1307             {
1308             #if PERL_VERSION_LE(5, 21, 5)
1309             dVAR; dXSARGS;
1310             #else
1311 36 50         dVAR; dXSBOOTARGSXSAPIVERCHK;
    50          
1312             #endif
1313             #if (PERL_REVISION == 5 && PERL_VERSION < 9)
1314             char* file = __FILE__;
1315             #else
1316 36           const char* file = __FILE__;
1317             #endif
1318              
1319             PERL_UNUSED_VAR(file);
1320              
1321             PERL_UNUSED_VAR(cv); /* -W */
1322             PERL_UNUSED_VAR(items); /* -W */
1323             #if PERL_VERSION_LE(5, 21, 5)
1324             XS_VERSION_BOOTCHECK;
1325             # ifdef XS_APIVERSION_BOOTCHECK
1326             XS_APIVERSION_BOOTCHECK;
1327             # endif
1328             #endif
1329              
1330 36           newXS_deffile("XS::Framework::__at_perl_destroy", XS_XS__Framework___at_perl_destroy);
1331 36           newXS_deffile("XS::Framework::__at_thread_create", XS_XS__Framework___at_thread_create);
1332 36           newXS_deffile("XS::Framework::sv_payload_attach", XS_XS__Framework_sv_payload_attach);
1333 36           newXS_deffile("XS::Framework::sv_payload_exists", XS_XS__Framework_sv_payload_exists);
1334 36           newXS_deffile("XS::Framework::sv_payload", XS_XS__Framework_sv_payload);
1335 36           newXS_deffile("XS::Framework::sv_payload_detach", XS_XS__Framework_sv_payload_detach);
1336 36           newXS_deffile("XS::Framework::rv_payload_attach", XS_XS__Framework_rv_payload_attach);
1337 36           newXS_deffile("XS::Framework::rv_payload_exists", XS_XS__Framework_rv_payload_exists);
1338 36           newXS_deffile("XS::Framework::rv_payload", XS_XS__Framework_rv_payload);
1339 36           newXS_deffile("XS::Framework::rv_payload_detach", XS_XS__Framework_rv_payload_detach);
1340 36           newXS_deffile("XS::Framework::any_payload_attach", XS_XS__Framework_any_payload_attach);
1341 36           newXS_deffile("XS::Framework::any_payload_exists", XS_XS__Framework_any_payload_exists);
1342 36           newXS_deffile("XS::Framework::any_payload", XS_XS__Framework_any_payload);
1343 36           newXS_deffile("XS::Framework::any_payload_detach", XS_XS__Framework_any_payload_detach);
1344 36           newXS_deffile("XS::Framework::obj2hv", XS_XS__Framework_obj2hv);
1345 36           newXS_deffile("XS::Framework::obj2av", XS_XS__Framework_obj2av);
1346 36           newXS_deffile("XS::STL::ErrorCode::new", XS_XS__STL__ErrorCode_new);
1347 36           newXS_deffile("XS::STL::ErrorCode::value", XS_XS__STL__ErrorCode_value);
1348 36           newXS_deffile("XS::STL::ErrorCode::category", XS_XS__STL__ErrorCode_category);
1349 36           newXS_deffile("XS::STL::ErrorCode::message", XS_XS__STL__ErrorCode_message);
1350 36           newXS_deffile("XS::STL::ErrorCode::_op_string", XS_XS__STL__ErrorCode__op_string);
1351 36           newXS_deffile("XS::STL::ErrorCode::_op_bool", XS_XS__STL__ErrorCode__op_bool);
1352 36           newXS_deffile("XS::STL::ErrorCode::_op_eq", XS_XS__STL__ErrorCode__op_eq);
1353 36           newXS_deffile("XS::STL::ErrorCode::_op_and", XS_XS__STL__ErrorCode__op_and);
1354 36           newXS_deffile("XS::STL::ErrorCategory::name", XS_XS__STL__ErrorCategory_name);
1355 36           newXS_deffile("XS::STL::ErrorCategory::message", XS_XS__STL__ErrorCategory_message);
1356 36           newXS_deffile("XS::STL::ErrorCategory::_op_string", XS_XS__STL__ErrorCategory__op_string);
1357 36           newXS_deffile("XS::STL::ErrorCategory::_op_eq", XS_XS__STL__ErrorCategory__op_eq);
1358 36           newXS_deffile("XS::ErrorCode::new", XS_XS__ErrorCode_new);
1359 36           newXS_deffile("XS::ErrorCode::value", XS_XS__ErrorCode_value);
1360 36           newXS_deffile("XS::ErrorCode::category", XS_XS__ErrorCode_category);
1361 36           newXS_deffile("XS::ErrorCode::message", XS_XS__ErrorCode_message);
1362 36           newXS_deffile("XS::ErrorCode::code", XS_XS__ErrorCode_code);
1363 36           newXS_deffile("XS::ErrorCode::next", XS_XS__ErrorCode_next);
1364 36           newXS_deffile("XS::ErrorCode::_op_string", XS_XS__ErrorCode__op_string);
1365 36           newXS_deffile("XS::ErrorCode::_op_bool", XS_XS__ErrorCode__op_bool);
1366 36           newXS_deffile("XS::ErrorCode::_op_eq", XS_XS__ErrorCode__op_eq);
1367 36           newXS_deffile("XS::ErrorCode::contains", XS_XS__ErrorCode_contains);
1368 36           newXS_deffile("XS::ErrorCode::_op_and", XS_XS__ErrorCode__op_and);
1369 36           newXS_deffile("XS::Framework::CallbackDispatcher::add", XS_XS__Framework__CallbackDispatcher_add);
1370 36           newXS_deffile("XS::Framework::CallbackDispatcher::add_back", XS_XS__Framework__CallbackDispatcher_add_back);
1371 36           newXS_deffile("XS::Framework::CallbackDispatcher::add_event_listener", XS_XS__Framework__CallbackDispatcher_add_event_listener);
1372 36           newXS_deffile("XS::Framework::CallbackDispatcher::add_event_listener_back", XS_XS__Framework__CallbackDispatcher_add_event_listener_back);
1373 36           newXS_deffile("XS::Framework::CallbackDispatcher::remove", XS_XS__Framework__CallbackDispatcher_remove);
1374 36           newXS_deffile("XS::Framework::CallbackDispatcher::remove_event_listener", XS_XS__Framework__CallbackDispatcher_remove_event_listener);
1375 36           newXS_deffile("XS::Framework::CallbackDispatcher::remove_all", XS_XS__Framework__CallbackDispatcher_remove_all);
1376 36           newXS_deffile("XS::Framework::CallbackDispatcher::has_listeners", XS_XS__Framework__CallbackDispatcher_has_listeners);
1377 36           newXS_deffile("XS::Framework::CallbackDispatcher::call", XS_XS__Framework__CallbackDispatcher_call);
1378              
1379             /* Initialisation Section */
1380              
1381             #line 10 "Framework.xs"
1382             {
1383             xs::typemap::object::init();
1384             }
1385              
1386             #line 8 "./Error.xsi"
1387             {
1388             register_error_constants();
1389             }
1390              
1391             #line 1392 "Framework_xsgen.cc"
1392              
1393             /* End of Initialisation Section */
1394              
1395             #if PERL_VERSION_LE(5, 21, 5)
1396             # if PERL_VERSION_GE(5, 9, 0)
1397             if (PL_unitcheckav)
1398             call_list(PL_scopestack_ix, PL_unitcheckav);
1399             # endif
1400             XSRETURN_YES;
1401             #else
1402 36           Perl_xs_boot_epilog(aTHX_ ax);
1403             #endif
1404 36 50         }); }
1405