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 Base2N.xs. Do not edit this file, edit Base2N.xs instead. |
4
|
|
|
|
|
|
|
* |
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
6
|
|
|
|
|
|
|
* |
7
|
|
|
|
|
|
|
*/ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "Base2N.xs" |
10
|
|
|
|
|
|
|
#include |
11
|
|
|
|
|
|
|
#include |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
using namespace panda::encode; |
14
|
|
|
|
|
|
|
using panda::string_view; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#line 17 "Base2N_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 "Base2N_xsgen.cc" |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
163
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_encode_base64) |
164
|
|
|
|
|
|
|
{ |
165
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
166
|
4
|
|
|
|
|
|
dXSI32; |
167
|
4
|
50
|
|
|
|
|
if (items != 1) |
168
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
169
|
|
|
|
|
|
|
{ |
170
|
|
|
|
|
|
|
SV * RETVAL; |
171
|
4
|
|
|
|
|
|
string_view input; |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
{ STRLEN __input_len; |
174
|
4
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
175
|
4
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
176
|
|
|
|
|
|
|
; |
177
|
|
|
|
|
|
|
#line 11 "Base2N.xs" |
178
|
|
|
|
|
|
|
RETVAL = newSV(encode_base64_getlen(input.length()) + 1); |
179
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
180
|
|
|
|
|
|
|
size_t rlen = encode_base64(input, SvPVX(RETVAL), ix == 1 ? true : false, ix == 2 ? true : false); |
181
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
182
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
183
|
|
|
|
|
|
|
#line 184 "Base2N_xsgen.cc" |
184
|
4
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
185
|
4
|
|
|
|
|
|
ST(0) = RETVAL; |
186
|
|
|
|
|
|
|
} |
187
|
4
|
|
|
|
|
|
XSRETURN(1); |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
|
192
|
4
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_decode_base64) |
193
|
|
|
|
|
|
|
{ |
194
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
195
|
4
|
50
|
|
|
|
|
if (items != 1) |
196
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
197
|
|
|
|
|
|
|
{ |
198
|
|
|
|
|
|
|
SV * RETVAL; |
199
|
4
|
|
|
|
|
|
string_view input; |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
{ STRLEN __input_len; |
202
|
4
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
203
|
4
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
204
|
|
|
|
|
|
|
; |
205
|
|
|
|
|
|
|
#line 19 "Base2N.xs" |
206
|
|
|
|
|
|
|
RETVAL = newSV(decode_base64_getlen(input.length()) + 1); |
207
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
208
|
|
|
|
|
|
|
size_t rlen = decode_base64(input, SvPVX(RETVAL)); |
209
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
210
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
211
|
|
|
|
|
|
|
#line 212 "Base2N_xsgen.cc" |
212
|
4
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
213
|
4
|
|
|
|
|
|
ST(0) = RETVAL; |
214
|
|
|
|
|
|
|
} |
215
|
4
|
|
|
|
|
|
XSRETURN(1); |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_encode_base32) |
221
|
|
|
|
|
|
|
{ |
222
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
223
|
2
|
|
|
|
|
|
dXSI32; |
224
|
2
|
50
|
|
|
|
|
if (items != 1) |
225
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
226
|
|
|
|
|
|
|
{ |
227
|
|
|
|
|
|
|
SV * RETVAL; |
228
|
2
|
|
|
|
|
|
string_view input; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
{ STRLEN __input_len; |
231
|
2
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
232
|
2
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
233
|
|
|
|
|
|
|
; |
234
|
|
|
|
|
|
|
#line 27 "Base2N.xs" |
235
|
|
|
|
|
|
|
RETVAL = newSV(encode_base32_getlen(input.length()) + 1); |
236
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
237
|
|
|
|
|
|
|
size_t rlen = encode_base32(input, SvPVX(RETVAL), ix == 1 ? false : true); |
238
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
239
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
240
|
|
|
|
|
|
|
#line 241 "Base2N_xsgen.cc" |
241
|
2
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
242
|
2
|
|
|
|
|
|
ST(0) = RETVAL; |
243
|
|
|
|
|
|
|
} |
244
|
2
|
|
|
|
|
|
XSRETURN(1); |
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
|
249
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_decode_base32) |
250
|
|
|
|
|
|
|
{ |
251
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
252
|
2
|
50
|
|
|
|
|
if (items != 1) |
253
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
254
|
|
|
|
|
|
|
{ |
255
|
|
|
|
|
|
|
SV * RETVAL; |
256
|
2
|
|
|
|
|
|
string_view input; |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
{ STRLEN __input_len; |
259
|
2
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
260
|
2
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
261
|
|
|
|
|
|
|
; |
262
|
|
|
|
|
|
|
#line 35 "Base2N.xs" |
263
|
|
|
|
|
|
|
RETVAL = newSV(decode_base32_getlen(input.length()) + 1); |
264
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
265
|
|
|
|
|
|
|
size_t rlen = decode_base32(input, SvPVX(RETVAL)); |
266
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
267
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
268
|
|
|
|
|
|
|
#line 269 "Base2N_xsgen.cc" |
269
|
2
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
270
|
2
|
|
|
|
|
|
ST(0) = RETVAL; |
271
|
|
|
|
|
|
|
} |
272
|
2
|
|
|
|
|
|
XSRETURN(1); |
273
|
|
|
|
|
|
|
} |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
277
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_encode_base16) |
278
|
|
|
|
|
|
|
{ |
279
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
280
|
2
|
|
|
|
|
|
dXSI32; |
281
|
2
|
50
|
|
|
|
|
if (items != 1) |
282
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
283
|
|
|
|
|
|
|
{ |
284
|
|
|
|
|
|
|
SV * RETVAL; |
285
|
2
|
|
|
|
|
|
string_view input; |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
{ STRLEN __input_len; |
288
|
2
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
289
|
2
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
290
|
|
|
|
|
|
|
; |
291
|
|
|
|
|
|
|
#line 43 "Base2N.xs" |
292
|
|
|
|
|
|
|
RETVAL = newSV(encode_base16_getlen(input.length()) + 1); |
293
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
294
|
|
|
|
|
|
|
size_t rlen = encode_base16(input, SvPVX(RETVAL), ix == 1 ? false : true); |
295
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
296
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
297
|
|
|
|
|
|
|
#line 298 "Base2N_xsgen.cc" |
298
|
2
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
299
|
2
|
|
|
|
|
|
ST(0) = RETVAL; |
300
|
|
|
|
|
|
|
} |
301
|
2
|
|
|
|
|
|
XSRETURN(1); |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
|
306
|
2
|
|
|
|
|
|
XS_EUPXS(XS_Encode__Base2N_decode_base16) |
307
|
|
|
|
|
|
|
{ |
308
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
309
|
2
|
50
|
|
|
|
|
if (items != 1) |
310
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "input"); |
311
|
|
|
|
|
|
|
{ |
312
|
|
|
|
|
|
|
SV * RETVAL; |
313
|
2
|
|
|
|
|
|
string_view input; |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
{ STRLEN __input_len; |
316
|
2
|
50
|
|
|
|
|
const char* __input_buf = SvPV(ST(0), __input_len); |
|
|
0
|
|
|
|
|
|
317
|
2
|
|
|
|
|
|
input = decltype(input)(__input_buf, __input_len); } |
318
|
|
|
|
|
|
|
; |
319
|
|
|
|
|
|
|
#line 51 "Base2N.xs" |
320
|
|
|
|
|
|
|
RETVAL = newSV(decode_base16_getlen(input.length()) + 1); |
321
|
|
|
|
|
|
|
SvPOK_on(RETVAL); |
322
|
|
|
|
|
|
|
size_t rlen = decode_base16(input, SvPVX(RETVAL)); |
323
|
|
|
|
|
|
|
SvPVX(RETVAL)[rlen] = 0; |
324
|
|
|
|
|
|
|
SvCUR_set(RETVAL, rlen); |
325
|
|
|
|
|
|
|
#line 326 "Base2N_xsgen.cc" |
326
|
2
|
50
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
327
|
2
|
|
|
|
|
|
ST(0) = RETVAL; |
328
|
|
|
|
|
|
|
} |
329
|
2
|
|
|
|
|
|
XSRETURN(1); |
330
|
|
|
|
|
|
|
} |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
#ifdef __cplusplus |
333
|
|
|
|
|
|
|
extern "C" |
334
|
|
|
|
|
|
|
#endif |
335
|
|
|
|
|
|
|
|
336
|
4
|
|
|
|
|
|
XS_EXTERNAL(boot_Encode__Base2N) |
337
|
|
|
|
|
|
|
{ |
338
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
339
|
|
|
|
|
|
|
dVAR; dXSARGS; |
340
|
|
|
|
|
|
|
#else |
341
|
4
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
50
|
|
|
|
|
|
342
|
|
|
|
|
|
|
#endif |
343
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
344
|
|
|
|
|
|
|
char* file = __FILE__; |
345
|
|
|
|
|
|
|
#else |
346
|
4
|
|
|
|
|
|
const char* file = __FILE__; |
347
|
|
|
|
|
|
|
#endif |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
352
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
353
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
354
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
355
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
356
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
357
|
|
|
|
|
|
|
# endif |
358
|
|
|
|
|
|
|
#endif |
359
|
|
|
|
|
|
|
|
360
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base64", XS_Encode__Base2N_encode_base64); |
361
|
4
|
|
|
|
|
|
XSANY.any_i32 = 0; |
362
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base64pad", XS_Encode__Base2N_encode_base64); |
363
|
4
|
|
|
|
|
|
XSANY.any_i32 = 2; |
364
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base64url", XS_Encode__Base2N_encode_base64); |
365
|
4
|
|
|
|
|
|
XSANY.any_i32 = 1; |
366
|
4
|
|
|
|
|
|
newXS_deffile("Encode::Base2N::decode_base64", XS_Encode__Base2N_decode_base64); |
367
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base32", XS_Encode__Base2N_encode_base32); |
368
|
4
|
|
|
|
|
|
XSANY.any_i32 = 0; |
369
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base32low", XS_Encode__Base2N_encode_base32); |
370
|
4
|
|
|
|
|
|
XSANY.any_i32 = 1; |
371
|
4
|
|
|
|
|
|
newXS_deffile("Encode::Base2N::decode_base32", XS_Encode__Base2N_decode_base32); |
372
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base16", XS_Encode__Base2N_encode_base16); |
373
|
4
|
|
|
|
|
|
XSANY.any_i32 = 0; |
374
|
4
|
|
|
|
|
|
cv = newXS_deffile("Encode::Base2N::encode_base16low", XS_Encode__Base2N_encode_base16); |
375
|
4
|
|
|
|
|
|
XSANY.any_i32 = 1; |
376
|
4
|
|
|
|
|
|
newXS_deffile("Encode::Base2N::decode_base16", XS_Encode__Base2N_decode_base16); |
377
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
378
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
379
|
|
|
|
|
|
|
if (PL_unitcheckav) |
380
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
381
|
|
|
|
|
|
|
# endif |
382
|
|
|
|
|
|
|
XSRETURN_YES; |
383
|
|
|
|
|
|
|
#else |
384
|
4
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
385
|
|
|
|
|
|
|
#endif |
386
|
4
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
|