File Coverage

lib.xs.cc
Criterion Covered Total %
statement 4 4 100.0
branch 2 4 50.0
condition n/a
subroutine n/a
pod n/a
total 6 8 75.0


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 lib.xs. Do not edit this file, edit lib.xs instead.
4             *
5             * ANY CHANGES MADE HERE WILL BE LOST!
6             *
7             */
8              
9             #line 1 "lib.xs"
10             #include
11            
12             #line 13 "lib.xs.cc"
13             #ifndef PERL_UNUSED_VAR
14             # define PERL_UNUSED_VAR(var) if (0) var = var
15             #endif
16              
17             #ifndef dVAR
18             # define dVAR dNOOP
19             #endif
20              
21              
22             /* This stuff is not part of the API! You have been warned. */
23             #ifndef PERL_VERSION_DECIMAL
24             # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
25             #endif
26             #ifndef PERL_DECIMAL_VERSION
27             # define PERL_DECIMAL_VERSION \
28             PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
29             #endif
30             #ifndef PERL_VERSION_GE
31             # define PERL_VERSION_GE(r,v,s) \
32             (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
33             #endif
34             #ifndef PERL_VERSION_LE
35             # define PERL_VERSION_LE(r,v,s) \
36             (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
37             #endif
38              
39             /* XS_INTERNAL is the explicit static-linkage variant of the default
40             * XS macro.
41             *
42             * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
43             * "STATIC", ie. it exports XSUB symbols. You probably don't want that
44             * for anything but the BOOT XSUB.
45             *
46             * See XSUB.h in core!
47             */
48              
49              
50             /* TODO: This might be compatible further back than 5.10.0. */
51             #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
52             # undef XS_EXTERNAL
53             # undef XS_INTERNAL
54             # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
55             # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
56             # define XS_INTERNAL(name) STATIC XSPROTO(name)
57             # endif
58             # if defined(__SYMBIAN32__)
59             # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
60             # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
61             # endif
62             # ifndef XS_EXTERNAL
63             # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
64             # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
65             # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
66             # else
67             # ifdef __cplusplus
68             # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
69             # define XS_INTERNAL(name) static XSPROTO(name)
70             # else
71             # define XS_EXTERNAL(name) XSPROTO(name)
72             # define XS_INTERNAL(name) STATIC XSPROTO(name)
73             # endif
74             # endif
75             # endif
76             #endif
77              
78             /* perl >= 5.10.0 && perl <= 5.15.1 */
79              
80              
81             /* The XS_EXTERNAL macro is used for functions that must not be static
82             * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
83             * macro defined, the best we can do is assume XS is the same.
84             * Dito for XS_INTERNAL.
85             */
86             #ifndef XS_EXTERNAL
87             # define XS_EXTERNAL(name) XS(name)
88             #endif
89             #ifndef XS_INTERNAL
90             # define XS_INTERNAL(name) XS(name)
91             #endif
92              
93             /* Now, finally, after all this mess, we want an ExtUtils::ParseXS
94             * internal macro that we're free to redefine for varying linkage due
95             * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
96             * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
97             */
98              
99             #undef XS_EUPXS
100             #if defined(PERL_EUPXS_ALWAYS_EXPORT)
101             # define XS_EUPXS(name) XS_EXTERNAL(name)
102             #else
103             /* default to internal */
104             # define XS_EUPXS(name) XS_INTERNAL(name)
105             #endif
106              
107             #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
108             #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
109              
110             /* prototype to pass -Wmissing-prototypes */
111             STATIC void
112             S_croak_xs_usage(const CV *const cv, const char *const params);
113              
114             STATIC void
115             S_croak_xs_usage(const CV *const cv, const char *const params)
116             {
117             const GV *const gv = CvGV(cv);
118              
119             PERL_ARGS_ASSERT_CROAK_XS_USAGE;
120              
121             if (gv) {
122             const char *const gvname = GvNAME(gv);
123             const HV *const stash = GvSTASH(gv);
124             const char *const hvname = stash ? HvNAME(stash) : NULL;
125              
126             if (hvname)
127             Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
128             else
129             Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
130             } else {
131             /* Pants. I don't think that it should be possible to get here. */
132             Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
133             }
134             }
135             #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
136              
137             #define croak_xs_usage S_croak_xs_usage
138              
139             #endif
140              
141             /* NOTE: the prototype of newXSproto() is different in versions of perls,
142             * so we define a portable version of newXSproto()
143             */
144             #ifdef newXS_flags
145             #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
146             #else
147             #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
148             #endif /* !defined(newXS_flags) */
149              
150             #if PERL_VERSION_LE(5, 21, 5)
151             # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
152             #else
153             # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
154             #endif
155              
156             #line 157 "lib.xs.cc"
157             #ifdef __cplusplus
158             extern "C"
159             #endif
160              
161 18           XS_EXTERNAL(boot_CPP__panda__lib)
162             {
163             #if PERL_VERSION_LE(5, 21, 5)
164             dVAR; dXSARGS;
165             #else
166 18 50         dVAR; dXSBOOTARGSXSAPIVERCHK;
    50          
167             #endif
168              
169             PERL_UNUSED_VAR(cv); /* -W */
170             PERL_UNUSED_VAR(items); /* -W */
171             #if PERL_VERSION_LE(5, 21, 5)
172             XS_VERSION_BOOTCHECK;
173             # ifdef XS_APIVERSION_BOOTCHECK
174             XS_APIVERSION_BOOTCHECK;
175             # endif
176             #endif
177              
178             #if PERL_VERSION_LE(5, 21, 5)
179             # if PERL_VERSION_GE(5, 9, 0)
180             if (PL_unitcheckav)
181             call_list(PL_scopestack_ix, PL_unitcheckav);
182             # endif
183             XSRETURN_YES;
184             #else
185 18           Perl_xs_boot_epilog(aTHX_ ax);
186             #endif
187 18           }
188