EUCppGuess.c

filter: Statementstmt 93.3% 14 / 15 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 80.9% 17 / 21 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
↑ Summary blib/lib/Acme/TestDist/Cpp/EUMM/EUCppGuess.pm »
1 /*
2 * This file was generated automatically by ExtUtils::ParseXS version 3.63 from the
3 * contents of EUCppGuess.xs. Do not edit this file, edit EUCppGuess.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8  
9 #line 1 "EUCppGuess.xs"
10 #include "EXTERN.h"
11 #include "perl.h"
12 #include "XSUB.h"
13  
14 #include "ppport.h"
15  
16 #include "nuratest.cpp"
17  
18 #line 19 "EUCppGuess.c"
19 #ifndef PERL_UNUSED_VAR
20 # define PERL_UNUSED_VAR(var) if (0) var = var
21 #endif
22  
23 #ifndef dVAR
24 # define dVAR dNOOP
25 #endif
26  
27  
28 /* This stuff is not part of the API! You have been warned. */
29 #ifndef PERL_VERSION_DECIMAL
30 # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
31 #endif
32 #ifndef PERL_DECIMAL_VERSION
33 # define PERL_DECIMAL_VERSION \
34 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
35 #endif
36 #ifndef PERL_VERSION_GE
37 # define PERL_VERSION_GE(r,v,s) \
38 (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
39 #endif
40 #ifndef PERL_VERSION_LE
41 # define PERL_VERSION_LE(r,v,s) \
42 (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
43 #endif
44  
45 /* XS_INTERNAL is the explicit static-linkage variant of the default
46 * XS macro.
47 *
48 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
49 * "static", ie. it exports XSUB symbols. You probably don't want that
50 * for anything but the BOOT XSUB.
51 *
52 * See XSUB.h in core!
53 */
54  
55  
56 /* TODO: This might be compatible further back than 5.10.0. */
57 #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
58 # undef XS_EXTERNAL
59 # undef XS_INTERNAL
60 # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
61 # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
62 # define XS_INTERNAL(name) static XSPROTO(name)
63 # endif
64 # if defined(__SYMBIAN32__)
65 # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
66 # define XS_INTERNAL(name) EXPORT_C static XSPROTO(name)
67 # endif
68 # ifndef XS_EXTERNAL
69 # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
70 # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
71 # define XS_INTERNAL(name) static void name(pTHX_ CV* cv __attribute__unused__)
72 # else
73 # ifdef __cplusplus
74 # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
75 # define XS_INTERNAL(name) static XSPROTO(name)
76 # else
77 # define XS_EXTERNAL(name) XSPROTO(name)
78 # define XS_INTERNAL(name) static XSPROTO(name)
79 # endif
80 # endif
81 # endif
82 #endif
83  
84 /* perl >= 5.10.0 && perl <= 5.15.1 */
85  
86  
87 /* The XS_EXTERNAL macro is used for functions that must not be static
88 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
89 * macro defined, the best we can do is assume XS is the same.
90 * Dito for XS_INTERNAL.
91 */
92 #ifndef XS_EXTERNAL
93 # define XS_EXTERNAL(name) XS(name)
94 #endif
95 #ifndef XS_INTERNAL
96 # define XS_INTERNAL(name) XS(name)
97 #endif
98  
99 /* Now, finally, after all this mess, we want an ExtUtils::ParseXS
100 * internal macro that we're free to redefine for varying linkage due
101 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
102 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
103 */
104  
105 #undef XS_EUPXS
106 #if defined(PERL_EUPXS_ALWAYS_EXPORT)
107 # define XS_EUPXS(name) XS_EXTERNAL(name)
108 #else
109 /* default to internal */
110 # define XS_EUPXS(name) XS_INTERNAL(name)
111 #endif
112  
113 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
114 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
115  
116 /* prototype to pass -Wmissing-prototypes */
117 static void
118 S_croak_xs_usage(const CV *const cv, const char *const params);
119  
120 static void
121 S_croak_xs_usage(const CV *const cv, const char *const params)
122 {
123 const GV *const gv = CvGV(cv);
124  
125 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
126  
127 if (gv) {
128 const char *const gvname = GvNAME(gv);
129 const HV *const stash = GvSTASH(gv);
130 const char *const hvname = stash ? HvNAME(stash) : NULL;
131  
132 if (hvname)
133 Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
134 else
135 Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
136 } else {
137 /* Pants. I don't think that it should be possible to get here. */
138 Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
139 }
140 }
141 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
142  
143 #define croak_xs_usage S_croak_xs_usage
144  
145 #endif
146  
147 /* NOTE: the prototype of newXSproto() is different in versions of perls,
148 * so we define a portable version of newXSproto()
149 */
150 #ifdef newXS_flags
151 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
152 #else
153 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
154 #endif /* !defined(newXS_flags) */
155  
156 #if PERL_VERSION_LE(5, 21, 5)
157 # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
158 #else
159 # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
160 #endif
161  
162 /* simple backcompat versions of the TARGx() macros with no optimisation */
163 #ifndef TARGi
164 # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv)
165 # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv)
166 # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv)
167 #endif
168  
169 #line 170 "EUCppGuess.c"
170  
171 XS_EUPXS(XS_Acme__TestDist__Cpp__EUMM__EUCppGuess_returnOne); /* prototype to pass -Wmissing-prototypes */
172 1 XS_EUPXS(XS_Acme__TestDist__Cpp__EUMM__EUCppGuess_returnOne)
173 {
174 1 dVAR; dXSARGS;
175 1 ▶ if (items != 0)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 0) 0 1 1
176 0 croak_xs_usage(cv, "");
177 {
178 int RETVAL;
179 1 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 1 0 1
180  
181 1 RETVAL = returnOne();
182 1 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 1 1
183 1 ST(0) = TARG;
184 }
185 1 XSRETURN(1);
186 }
187  
188 #ifdef __cplusplus
189 extern "C" {
190 #endif
191 XS_EXTERNAL(boot_Acme__TestDist__Cpp__EUMM__EUCppGuess); /* prototype to pass -Wmissing-prototypes */
192 1 XS_EXTERNAL(boot_Acme__TestDist__Cpp__EUMM__EUCppGuess)
193 {
194 #if PERL_VERSION_LE(5, 21, 5)
195 dVAR; dXSARGS;
196 #else
197 1 dVAR; dXSBOOTARGSXSAPIVERCHK;
198 #endif
199 #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
200 char* file = __FILE__;
201 #else
202 1 const char* file = __FILE__;
203 #endif
204  
205 PERL_UNUSED_VAR(file);
206  
207 PERL_UNUSED_VAR(cv); /* -W */
208 PERL_UNUSED_VAR(items); /* -W */
209 #if PERL_VERSION_LE(5, 21, 5)
210 XS_VERSION_BOOTCHECK;
211 # ifdef XS_APIVERSION_BOOTCHECK
212 XS_APIVERSION_BOOTCHECK;
213 # endif
214 #endif
215  
216 1 newXS_deffile("Acme::TestDist::Cpp::EUMM::EUCppGuess::returnOne", XS_Acme__TestDist__Cpp__EUMM__EUCppGuess_returnOne);
217 #if PERL_VERSION_LE(5, 21, 5)
218 # if PERL_VERSION_GE(5, 9, 0)
219 if (PL_unitcheckav)
220 call_list(PL_scopestack_ix, PL_unitcheckav);
221 # endif
222 XSRETURN_YES;
223 #else
224 1 Perl_xs_boot_epilog(aTHX_ ax);
225 #endif
226 1 }
227  
228 #ifdef __cplusplus
229 }
230 #endif
↑ Summary blib/lib/Acme/TestDist/Cpp/EUMM/EUCppGuess.pm »