MAB2table.c

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