xs/main_xsgen.cc

filter: Statementstmt 73.4% 686 / 934 Branchbran 38.1% 304 / 798 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 57.1% 990 / 1732 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/URI.xsi ↑ Summary src/xs/uri.h »
1 /*
2 * This file was generated automatically by XS::Install::FrozenShit::ParseXS version 3.57 from the
3 * contents of main.xs. Do not edit this file, edit main.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8  
9 #line 1 "xs/main.xs"
10 #include <xs/uri.h>
11 #include <xs/export.h>
12 #include <unordered_map>
13 #include <panda/uri/all.h>
14 #include <panda/string_view.h>
15  
16 using namespace xs;
17 using namespace xs::uri;
18 using namespace panda::uri;
19 using panda::string;
20 using panda::string_view;
21  
22 static std::unordered_map<string, Stash> uri_class_map;
23 static Sv::payload_marker_t data_marker;
24  
25 struct XsUriData {
26 XsUriData () : query_cache_rev(0) {}
27  
28 void sync_query_hash (const URI* uri) {
29 Hash hash;
30 if (query_cache) {
31 hash = query_cache.value<Hash>();
32 hash.clear();
33 } else {
34 hash = Hash::create();
35 query_cache = Ref::create(hash);
36 }
37  
38 auto end = uri->query().cend();
39 for (auto it = uri->query().cbegin(); it != end; ++it) hash.store(it->first, Simple(it->second));
40  
41 query_cache_rev = uri->query().rev;
42 }
43  
44 Ref query_hash (const URI* uri) {
45 if (!query_cache || query_cache_rev != uri->query().rev) sync_query_hash(uri);
46 return query_cache;
47 }
48  
49 private:
50 Ref query_cache;
51 uint32_t query_cache_rev;
52 };
53  
54 static void register_perl_scheme (const string& scheme, const string_view& perl_class) {
55 uri_class_map[scheme] = Stash(perl_class);
56 }
57  
58 Stash xs::uri::get_perl_class (const URI* uri) {
59 auto it = uri_class_map.find(uri->scheme());
60 if (it == uri_class_map.end()) return Stash();
61 else return it->second;
62 }
63  
64 void xs::uri::data_attach (Sv& sv) {
65 void* data = new XsUriData();
66 Object(sv).payload_attach(data, &data_marker);
67 }
68  
69 static int data_free (pTHX_ SV*, MAGIC* mg) {
70 auto data = (XsUriData*)mg->mg_ptr;
71 delete data;
72 return 0;
73 }
74  
75 static XsUriData* data_get (SV* sv) {
76 return (XsUriData*)Object(sv).payload(&data_marker).ptr;
77 }
78  
79 static void add_param (URI* uri, const string& key, const Scalar& val, bool replace = false) {
80 if (val.is_array_ref()) {
81 Array arr = val;
82 if (replace) uri->query().erase(key);
83 auto end = arr.end();
84 for (auto it = arr.begin(); it != end; ++it) {
85 if (!*it) continue;
86 uri->query().emplace(key, xs::in<string>(*it));
87 }
88 }
89 else if (replace) uri->param(key, xs::in<string>(val));
90 else uri->query().emplace(key, xs::in<string>(val));
91 }
92  
93 static void hash2query (Hash& hash, Query* query) {
94 auto end = hash.end();
95 for (auto it = hash.begin(); it != end; ++it) {
96 string key(it->key());
97 auto val = it->value();
98 if (val.is_array_ref()) {
99 Array arr = val;
100 auto end = arr.end();
101 for (auto it = arr.begin(); it != end; ++it) {
102 if (!*it) continue;
103 query->emplace(key, xs::in<string>(*it));
104 }
105 }
106 else query->emplace(key, xs::in<string>(val));
107 }
108 }
109  
110 static void add_query_hash (URI* uri, Hash& hash, bool replace = false) {
111 if (replace) {
112 Query query;
113 hash2query(hash, &query);
114 uri->query(query);
115 }
116 else {
117 auto end = hash.end();
118 for (auto it = hash.begin(); it != end; ++it) add_param(uri, string(it->key()), it->value());
119 }
120 }
121  
122 static void add_query_args (URI* uri, SV** sp, I32 items, bool replace = false) {
123 if (items == 1) {
124 if (SvROK(*sp)) {
125 Hash hash = *sp;
126 if (hash) add_query_hash(uri, hash, replace);
127 }
128 else if (replace) uri->query(xs::in<string>(*sp));
129 else uri->add_query(xs::in<string>(*sp));
130 }
131 else {
132 SV** spe = sp + items;
133 for (; sp < spe; sp += 2) add_param(uri, xs::in<string>(*sp), *(sp+1), replace);
134 }
135 }
136  
137 #line 138 "xs/main_xsgen.cc"
138 #ifndef PERL_UNUSED_VAR
139 # define PERL_UNUSED_VAR(var) if (0) var = var
140 #endif
141  
142 #ifndef dVAR
143 # define dVAR dNOOP
144 #endif
145  
146  
147 /* This stuff is not part of the API! You have been warned. */
148 #ifndef PERL_VERSION_DECIMAL
149 # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
150 #endif
151 #ifndef PERL_DECIMAL_VERSION
152 # define PERL_DECIMAL_VERSION \
153 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
154 #endif
155 #ifndef PERL_VERSION_GE
156 # define PERL_VERSION_GE(r,v,s) \
157 (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
158 #endif
159 #ifndef PERL_VERSION_LE
160 # define PERL_VERSION_LE(r,v,s) \
161 (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
162 #endif
163  
164 /* XS_INTERNAL is the explicit static-linkage variant of the default
165 * XS macro.
166 *
167 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
168 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
169 * for anything but the BOOT XSUB.
170 *
171 * See XSUB.h in core!
172 */
173  
174  
175 /* TODO: This might be compatible further back than 5.10.0. */
176 #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
177 # undef XS_EXTERNAL
178 # undef XS_INTERNAL
179 # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
180 # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
181 # define XS_INTERNAL(name) STATIC XSPROTO(name)
182 # endif
183 # if defined(__SYMBIAN32__)
184 # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
185 # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
186 # endif
187 # ifndef XS_EXTERNAL
188 # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
189 # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
190 # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
191 # else
192 # ifdef __cplusplus
193 # define XS_EXTERNAL(name) extern "C" XSPROTO(name)
194 # define XS_INTERNAL(name) static XSPROTO(name)
195 # else
196 # define XS_EXTERNAL(name) XSPROTO(name)
197 # define XS_INTERNAL(name) STATIC XSPROTO(name)
198 # endif
199 # endif
200 # endif
201 #endif
202  
203 /* perl >= 5.10.0 && perl <= 5.15.1 */
204  
205  
206 /* The XS_EXTERNAL macro is used for functions that must not be static
207 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
208 * macro defined, the best we can do is assume XS is the same.
209 * Dito for XS_INTERNAL.
210 */
211 #ifndef XS_EXTERNAL
212 # define XS_EXTERNAL(name) XS(name)
213 #endif
214 #ifndef XS_INTERNAL
215 # define XS_INTERNAL(name) XS(name)
216 #endif
217  
218 /* Now, finally, after all this mess, we want an XS::Install::FrozenShit::ParseXS
219 * internal macro that we're free to redefine for varying linkage due
220 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
221 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
222 */
223  
224 #undef XS_EUPXS
225 #if defined(PERL_EUPXS_ALWAYS_EXPORT)
226 # define XS_EUPXS(name) XS_EXTERNAL(name)
227 #else
228 /* default to internal */
229 # define XS_EUPXS(name) XS_INTERNAL(name)
230 #endif
231  
232 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
233 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
234  
235 /* prototype to pass -Wmissing-prototypes */
236 STATIC void
237 S_croak_xs_usage(const CV *const cv, const char *const params);
238  
239 STATIC void
240 S_croak_xs_usage(const CV *const cv, const char *const params)
241 {
242 const GV *const gv = CvGV(cv);
243  
244 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
245  
246 if (gv) {
247 const char *const gvname = GvNAME(gv);
248 const HV *const stash = GvSTASH(gv);
249 const char *const hvname = stash ? HvNAME(stash) : NULL;
250  
251 if (hvname)
252 Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
253 else
254 Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
255 } else {
256 /* Pants. I don't think that it should be possible to get here. */
257 Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
258 }
259 }
260 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
261  
262 #define croak_xs_usage S_croak_xs_usage
263  
264 #endif
265  
266 /* NOTE: the prototype of newXSproto() is different in versions of perls,
267 * so we define a portable version of newXSproto()
268 */
269 #ifdef newXS_flags
270 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
271 #else
272 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
273 #endif /* !defined(newXS_flags) */
274  
275 #if PERL_VERSION_LE(5, 21, 5)
276 # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
277 #else
278 # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
279 #endif
280  
281 /* simple backcompat versions of the TARGx() macros with no optimisation */
282 #ifndef TARGi
283 # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv)
284 # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv)
285 # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv)
286 #endif
287  
288 #line 289 "xs/main_xsgen.cc"
289  
290  
291 38 ▶XS_EUPXS(XS_URI__XS_uri) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_uri) { xs::throw_guard(cv, [=]() 19 0 19
292 {
293 19 dVAR; dXSARGS;
294 19 ▶ if (items < 0 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 0 || items > 2) 19 0 19
if (items < 0 || items > 2) 0 19 19
295 0 croak_xs_usage(cv, "url= string(), flags= 0");
296 {
297 19 URIx RETVAL;
298 19 string url;
299 int flags;
300  
301 19 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 19 19
302 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
303 else {
304 { STRLEN __url_len;
305 19 const char* __url_buf = SvPV(ST(0), __url_len);
306 19 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 19 0 19
307 ;
308 }
309  
310 19 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 19 0 19
311 19 flags = 0;
312 else {
313 0 ▶ flags = (int)SvIV(ST(1))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(1)) 0 0 0
314 ;
315 }
316 #line 140 "xs/main.xs"
317 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
318 RETVAL = URI::create(url, flags);
319 #line 320 "xs/main_xsgen.cc"
320 {
321 SV * RETVALSV;
322 19 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 19 0 19
323 19 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 19 0 19
324 19 ST(0) = RETVALSV;
325 }
326 19 }
327 19 XSRETURN(1);
328 19 }); }
329  
330  
331  
332 2 ▶XS_EUPXS(XS_URI__XS_register_scheme) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_register_scheme) { xs::throw_guard(cv, [=]() 1 0 1
333 {
334 1 dVAR; dXSARGS;
335 1 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 1 1
336 0 croak_xs_usage(cv, "scheme, perl_class");
337 PERL_UNUSED_VAR(ax); /* -Wall */
338 1 SP -= items;
339 {
340 1 string scheme;
341 1 string_view perl_class;
342  
343 { STRLEN __scheme_len;
344 1 const char* __scheme_buf = SvPV(ST(0), __scheme_len);
345 1 ▶ scheme.assign(__scheme_buf, __scheme_len); }
Branch: 1 branch
BranchTrueFalseTotal
scheme.assign(__scheme_buf, __scheme_len); } 1 0 1
346 ;
347  
348 { STRLEN __perl_class_len;
349 1 const char* __perl_class_buf = SvPV(ST(1), __perl_class_len);
350 1 ▶ perl_class = decltype(perl_class)(__perl_class_buf, __perl_class_len); }
Branch: 1 branch
BranchTrueFalseTotal
perl_class = decltype(perl_class)(__perl_class_buf, __perl_class_len); } 1 0 1
351 ;
352 #line 144 "xs/main.xs"
353 register_perl_scheme(scheme, perl_class);
354 #line 355 "xs/main_xsgen.cc"
355 1 PUTBACK;
356 2 return;
357 1 }
358 1 }); }
359  
360  
361  
362 0 ▶XS_EUPXS(XS_URI__XS_bench_parse) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_bench_parse) { xs::throw_guard(cv, [=]() 0 0 0
363 {
364 0 dVAR; dXSARGS;
365 0 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 0 0 0
if (items < 1 || items > 2) 0 0 0
366 0 croak_xs_usage(cv, "str, flags= 0");
367 {
368 uint64_t RETVAL;
369 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
370 0 string str;
371 int flags;
372  
373 { STRLEN __str_len;
374 0 const char* __str_buf = SvPV(ST(0), __str_len);
375 0 ▶ str.assign(__str_buf, __str_len); }
Branch: 1 branch
BranchTrueFalseTotal
str.assign(__str_buf, __str_len); } 0 0 0
376 ;
377  
378 0 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 0 0
379 0 flags = 0;
380 else {
381 0 ▶ flags = (int)SvIV(ST(1))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(1)) 0 0 0
382 ;
383 }
384 #line 148 "xs/main.xs"
385 RETVAL = 0;
386 for (int i = 0; i < 1000; ++i) {
387 URI u(str, flags);
388 RETVAL += u.path().length();
389 }
390 #line 391 "xs/main_xsgen.cc"
391 0 ▶ TARGu((UV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 0 0
TARGu((UV)RETVAL, 1); 0 0 0
392 0 ST(0) = TARG;
393 0 }
394 0 XSRETURN(1);
395 0 }); }
396  
397  
398  
399 0 ▶XS_EUPXS(XS_URI__XS_test_parse) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_test_parse) { xs::throw_guard(cv, [=]() 0 0 0
400 {
401 0 dVAR; dXSARGS;
402 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
403 0 croak_xs_usage(cv, "str");
404 PERL_UNUSED_VAR(ax); /* -Wall */
405 0 SP -= items;
406 {
407 0 string str;
408  
409 { STRLEN __str_len;
410 0 const char* __str_buf = SvPV(ST(0), __str_len);
411 0 ▶ str.assign(__str_buf, __str_len); }
Branch: 1 branch
BranchTrueFalseTotal
str.assign(__str_buf, __str_len); } 0 0 0
412 ;
413 #line 156 "xs/main.xs"
414 auto uri = URI(str);
415 printf("scheme=%s\n", uri.scheme().c_str());
416 printf("userinfo=%s\n", uri.user_info().c_str());
417 printf("host=%s\n", uri.host().c_str());
418 printf("port=%d\n", uri.port());
419 printf("path=%s\n", uri.path().c_str());
420 printf("query=%s\n", uri.raw_query().c_str());
421 printf("fragment=%s\n", uri.fragment().c_str());
422 #line 423 "xs/main_xsgen.cc"
423 0 PUTBACK;
424 0 return;
425 0 }
426 0 }); }
427  
428  
429  
430 0 ▶XS_EUPXS(XS_URI__XS_bench_parse_query) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_bench_parse_query) { xs::throw_guard(cv, [=]() 0 0 0
431 {
432 0 dVAR; dXSARGS;
433 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
434 0 croak_xs_usage(cv, "str");
435 PERL_UNUSED_VAR(ax); /* -Wall */
436 0 SP -= items;
437 {
438 0 string str;
439  
440 { STRLEN __str_len;
441 0 const char* __str_buf = SvPV(ST(0), __str_len);
442 0 ▶ str.assign(__str_buf, __str_len); }
Branch: 1 branch
BranchTrueFalseTotal
str.assign(__str_buf, __str_len); } 0 0 0
443 ;
444 #line 167 "xs/main.xs"
445 URI u;
446 for (int i = 0; i < 1000; ++i) {
447 u.query_string(str);
448 u.query();
449 }
450 #line 451 "xs/main_xsgen.cc"
451 0 PUTBACK;
452 0 return;
453 0 }
454 0 }); }
455  
456  
457  
458 0 ▶XS_EUPXS(XS_URI__XS_bench_encode_uri_component) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_bench_encode_uri_component) { xs::throw_guard(cv, [=]() 0 0 0
459 {
460 0 dVAR; dXSARGS;
461 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
462 0 croak_xs_usage(cv, "str");
463 {
464 uint64_t RETVAL;
465 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
466 0 string_view str;
467  
468 { STRLEN __str_len;
469 0 const char* __str_buf = SvPV(ST(0), __str_len);
470 0 str = decltype(str)(__str_buf, __str_len); }
471 ;
472 #line 175 "xs/main.xs"
473 RETVAL = 0;
474 auto dest = (char*)alloca(str.length() * 3);
475 for (int i = 0; i < 1000; ++i) {
476 encode_uri_component(str, dest);
477 }
478 #line 479 "xs/main_xsgen.cc"
479 0 ▶ TARGu((UV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 0 0
TARGu((UV)RETVAL, 1); 0 0 0
480 0 ST(0) = TARG;
481 }
482 0 XSRETURN(1);
483 0 }); }
484  
485  
486  
487 0 ▶XS_EUPXS(XS_URI__XS_bench_decode_uri_component) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_bench_decode_uri_component) { xs::throw_guard(cv, [=]() 0 0 0
488 {
489 0 dVAR; dXSARGS;
490 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
491 0 croak_xs_usage(cv, "str");
492 {
493 uint64_t RETVAL;
494 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
495 0 string_view str;
496  
497 { STRLEN __str_len;
498 0 const char* __str_buf = SvPV(ST(0), __str_len);
499 0 str = decltype(str)(__str_buf, __str_len); }
500 ;
501 #line 183 "xs/main.xs"
502 RETVAL = 0;
503 auto dest = (char*)alloca(str.length());
504 for (int i = 0; i < 1000; ++i) {
505 decode_uri_component(str, dest);
506 }
507 #line 508 "xs/main_xsgen.cc"
508 0 ▶ TARGu((UV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 0 0
TARGu((UV)RETVAL, 1); 0 0 0
509 0 ST(0) = TARG;
510 }
511 0 XSRETURN(1);
512 0 }); }
513  
514  
515 /* INCLUDE: Including 'encode.xsi' from 'main.xs' */
516  
517  
518 /* INCLUDE: Including 'URI.xsi' from 'encode.xsi' */
519  
520  
521 /* INCLUDE: Including 'schemas.xsi' from 'URI.xsi' */
522  
523  
524 /* INCLUDE: Including 'cloning.xsi' from 'schemas.xsi' */
525  
526  
527  
528 0 ▶XS_EUPXS(XS_URI__XS_HOOK_CLONE) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_HOOK_CLONE) { xs::throw_guard(cv, [=]() 0 0 0
529 {
530 0 dVAR; dXSARGS;
531 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
532 0 croak_xs_usage(cv, "THIS");
533 {
534 0 URISP RETVAL;
535 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
536 ;
537 #line 5 "xs/cloning.xsi"
538 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
539 PROTO = Object(ST(0)).stash();
540 if (dynamic_cast<URIStrict*>(THIS)) RETVAL = URI::create(*THIS);
541 else RETVAL = make_backref<URI>(*THIS);
542 #line 543 "xs/main_xsgen.cc"
543 {
544 SV * RETVALSV;
545 0 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 0 0 0
546 0 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 0 0 0
547 0 ST(0) = RETVALSV;
548 }
549 0 }
550 0 XSRETURN(1);
551 0 }); }
552  
553  
554  
555 6 ▶XS_EUPXS(XS_URI__XS_STORABLE_freeze) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_STORABLE_freeze) { xs::throw_guard(cv, [=]() 3 0 3
556 {
557 3 dVAR; dXSARGS;
558 3 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 3 3
559 0 croak_xs_usage(cv, "THIS, _____unused1");
560 {
561 3 string RETVAL;
562 3 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 3 3
dXSTARG; 3 0 3
563 3 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 3 0 3
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 3 3
564 ;
565 #line 11 "xs/cloning.xsi"
566 RETVAL = THIS->to_string();
567 if (dynamic_cast<URIStrict*>(THIS)) RETVAL += '1';
568 else RETVAL += '0';
569 #line 570 "xs/main_xsgen.cc"
570 3 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 3 0 3
571 3 ST(0) = TARG;
572 3 }
573 3 XSRETURN(1);
574 3 }); }
575  
576  
577  
578 6 ▶XS_EUPXS(XS_URI__XS_STORABLE_attach) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_STORABLE_attach) { xs::throw_guard(cv, [=]() 3 0 3
579 {
580 3 dVAR; dXSARGS;
581 3 ▶ if (items != 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 3) 0 3 3
582 0 croak_xs_usage(cv, "CLASS, _____unused2, serialized");
583 {
584 3 URISP RETVAL;
585 3 SV* CLASS = ST(0)
586 ;
587 3 SV* serialized = ST(2)
588 ;
589 #line 17 "xs/cloning.xsi"
590 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
591 STRLEN len;
592 char* p = SvPV(serialized, len);
593 len--;
594 char ctrl = p[len];
595 p[len] = 0;
596 if (ctrl == '1') RETVAL = URI::create(string(p, len));
597 else RETVAL = make_backref<URI>(string(p, len));
598 PROTO = CLASS;
599 #line 600 "xs/main_xsgen.cc"
600 {
601 SV * RETVALSV;
602 3 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 3 0 3
603 3 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 3 0 3
604 3 ST(0) = RETVALSV;
605 }
606 3 }
607 3 XSRETURN(1);
608 3 }); }
609  
610  
611  
612 0 ▶XS_EUPXS(XS_URI__XS_TO_JSON) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_TO_JSON) { xs::throw_guard(cv, [=]() 0 0 0
613 {
614 0 dVAR; dXSARGS;
615 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
616 0 croak_xs_usage(cv, "THIS");
617 {
618 0 string RETVAL;
619 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
620 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
621 ;
622 #line 28 "xs/cloning.xsi"
623 RETVAL = THIS->to_string();
624 #line 625 "xs/main_xsgen.cc"
625 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
626 0 ST(0) = TARG;
627 0 }
628 0 XSRETURN(1);
629 0 }); }
630  
631  
632 /* INCLUDE: Returning to 'schemas.xsi' from 'cloning.xsi' */
633  
634  
635  
636 14 ▶XS_EUPXS(XS_URI__XS__http_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__http_new) { xs::throw_guard(cv, [=]() 6 0 6
637 {
638 7 dVAR; dXSARGS;
639 7 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 7 7
640 0 croak_xs_usage(cv, "CLASS, url= string(), ...");
641 {
642 URI::http * RETVAL;
643 7 SV* CLASS = ST(0)
644 ;
645 7 string url;
646  
647 7 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 7 7
648 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
649 else {
650 { STRLEN __url_len;
651 7 const char* __url_buf = SvPV(ST(1), __url_len);
652 7 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 7 0 7
653 ;
654 }
655 #line 11 "xs/schemas.xsi"
656 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
657 PROTO = CLASS;
658 RETVAL = make_backref<URI::http>(url);
659 add_query_args(RETVAL, MARK+3, items-2);
660 #line 661 "xs/main_xsgen.cc"
661 {
662 SV * RETVALSV;
663 6 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 6 0 6
664 6 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 6 0 6
665 6 ST(0) = RETVALSV;
666 }
667 8 }
668 6 XSRETURN(1);
669 6 }); }
670  
671  
672  
673 4 ▶XS_EUPXS(XS_URI__XS__https_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__https_new) { xs::throw_guard(cv, [=]() 2 0 2
674 {
675 2 dVAR; dXSARGS;
676 2 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 2 2
677 0 croak_xs_usage(cv, "CLASS, url= string(), ...");
678 {
679 URI::https * RETVAL;
680 2 SV* CLASS = ST(0)
681 ;
682 2 string url;
683  
684 2 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 2 2
685 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
686 else {
687 { STRLEN __url_len;
688 2 const char* __url_buf = SvPV(ST(1), __url_len);
689 2 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 2 0 2
690 ;
691 }
692 #line 27 "xs/schemas.xsi"
693 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
694 PROTO = CLASS;
695 RETVAL = make_backref<URI::https>(url);
696 add_query_args(RETVAL, MARK+3, items-2);
697 #line 698 "xs/main_xsgen.cc"
698 {
699 SV * RETVALSV;
700 2 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 2 0 2
701 2 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 2 0 2
702 2 ST(0) = RETVALSV;
703 }
704 2 }
705 2 XSRETURN(1);
706 2 }); }
707  
708  
709  
710 2 ▶XS_EUPXS(XS_URI__XS__ws_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__ws_new) { xs::throw_guard(cv, [=]() 1 0 1
711 {
712 1 dVAR; dXSARGS;
713 1 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 1 1
714 0 croak_xs_usage(cv, "CLASS, url= string(), ...");
715 {
716 URI::ws * RETVAL;
717 1 SV* CLASS = ST(0)
718 ;
719 1 string url;
720  
721 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
722 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
723 else {
724 { STRLEN __url_len;
725 1 const char* __url_buf = SvPV(ST(1), __url_len);
726 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
727 ;
728 }
729 #line 43 "xs/schemas.xsi"
730 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
731 PROTO = CLASS;
732 RETVAL = make_backref<URI::ws>(url);
733 add_query_args(RETVAL, MARK+3, items-2);
734 #line 735 "xs/main_xsgen.cc"
735 {
736 SV * RETVALSV;
737 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
738 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
739 1 ST(0) = RETVALSV;
740 }
741 1 }
742 1 XSRETURN(1);
743 1 }); }
744  
745  
746  
747 2 ▶XS_EUPXS(XS_URI__XS__wss_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__wss_new) { xs::throw_guard(cv, [=]() 1 0 1
748 {
749 1 dVAR; dXSARGS;
750 1 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 1 1
751 0 croak_xs_usage(cv, "CLASS, url= string(), ...");
752 {
753 URI::wss * RETVAL;
754 1 SV* CLASS = ST(0)
755 ;
756 1 string url;
757  
758 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
759 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
760 else {
761 { STRLEN __url_len;
762 1 const char* __url_buf = SvPV(ST(1), __url_len);
763 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
764 ;
765 }
766 #line 59 "xs/schemas.xsi"
767 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
768 PROTO = CLASS;
769 RETVAL = make_backref<URI::wss>(url);
770 add_query_args(RETVAL, MARK+3, items-2);
771 #line 772 "xs/main_xsgen.cc"
772 {
773 SV * RETVALSV;
774 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
775 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
776 1 ST(0) = RETVALSV;
777 }
778 1 }
779 1 XSRETURN(1);
780 1 }); }
781  
782  
783  
784 4 ▶XS_EUPXS(XS_URI__XS__ftp_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__ftp_new) { xs::throw_guard(cv, [=]() 2 0 2
785 {
786 2 dVAR; dXSARGS;
787 2 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 2 0 2
if (items < 1 || items > 3) 0 2 2
788 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
789 {
790 URI::ftp * RETVAL;
791 2 SV* CLASS = ST(0)
792 ;
793 2 string url;
794 int flags;
795  
796 2 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 2 2
797 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
798 else {
799 { STRLEN __url_len;
800 2 const char* __url_buf = SvPV(ST(1), __url_len);
801 2 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 2 0 2
802 ;
803 }
804  
805 2 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 1 1 2
806 1 flags = 0;
807 else {
808 1 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 1 0 1
809 ;
810 }
811 #line 75 "xs/schemas.xsi"
812 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
813 PROTO = CLASS;
814 RETVAL = make_backref<URI::ftp>(url, flags);
815 #line 816 "xs/main_xsgen.cc"
816 {
817 SV * RETVALSV;
818 2 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 2 0 2
819 2 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 2 0 2
820 2 ST(0) = RETVALSV;
821 }
822 2 }
823 2 XSRETURN(1);
824 2 }); }
825  
826  
827  
828 2 ▶XS_EUPXS(XS_URI__XS__socks_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__socks_new) { xs::throw_guard(cv, [=]() 1 0 1
829 {
830 1 dVAR; dXSARGS;
831 1 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 1 0 1
if (items < 1 || items > 3) 0 1 1
832 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
833 {
834 URI::socks * RETVAL;
835 1 SV* CLASS = ST(0)
836 ;
837 1 string url;
838 int flags;
839  
840 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
841 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
842 else {
843 { STRLEN __url_len;
844 1 const char* __url_buf = SvPV(ST(1), __url_len);
845 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
846 ;
847 }
848  
849 1 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 1 0 1
850 1 flags = 0;
851 else {
852 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
853 ;
854 }
855 #line 90 "xs/schemas.xsi"
856 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
857 PROTO = CLASS;
858 RETVAL = make_backref<URI::socks>(url, flags);
859 #line 860 "xs/main_xsgen.cc"
860 {
861 SV * RETVALSV;
862 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
863 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
864 1 ST(0) = RETVALSV;
865 }
866 1 }
867 1 XSRETURN(1);
868 1 }); }
869  
870  
871  
872 2 ▶XS_EUPXS(XS_URI__XS__ssh_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__ssh_new) { xs::throw_guard(cv, [=]() 1 0 1
873 {
874 1 dVAR; dXSARGS;
875 1 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 1 0 1
if (items < 1 || items > 3) 0 1 1
876 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
877 {
878 URI::ssh * RETVAL;
879 1 SV* CLASS = ST(0)
880 ;
881 1 string url;
882 int flags;
883  
884 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
885 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
886 else {
887 { STRLEN __url_len;
888 1 const char* __url_buf = SvPV(ST(1), __url_len);
889 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
890 ;
891 }
892  
893 1 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 1 0 1
894 1 flags = 0;
895 else {
896 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
897 ;
898 }
899 #line 105 "xs/schemas.xsi"
900 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
901 PROTO = CLASS;
902 RETVAL = make_backref<URI::ssh>(url, flags);
903 #line 904 "xs/main_xsgen.cc"
904 {
905 SV * RETVALSV;
906 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
907 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
908 1 ST(0) = RETVALSV;
909 }
910 1 }
911 1 XSRETURN(1);
912 1 }); }
913  
914  
915  
916 2 ▶XS_EUPXS(XS_URI__XS__telnet_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__telnet_new) { xs::throw_guard(cv, [=]() 1 0 1
917 {
918 1 dVAR; dXSARGS;
919 1 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 1 0 1
if (items < 1 || items > 3) 0 1 1
920 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
921 {
922 URI::telnet * RETVAL;
923 1 SV* CLASS = ST(0)
924 ;
925 1 string url;
926 int flags;
927  
928 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
929 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
930 else {
931 { STRLEN __url_len;
932 1 const char* __url_buf = SvPV(ST(1), __url_len);
933 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
934 ;
935 }
936  
937 1 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 1 0 1
938 1 flags = 0;
939 else {
940 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
941 ;
942 }
943 #line 120 "xs/schemas.xsi"
944 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
945 PROTO = CLASS;
946 RETVAL = make_backref<URI::telnet>(url, flags);
947 #line 948 "xs/main_xsgen.cc"
948 {
949 SV * RETVALSV;
950 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
951 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
952 1 ST(0) = RETVALSV;
953 }
954 1 }
955 1 XSRETURN(1);
956 1 }); }
957  
958  
959  
960 2 ▶XS_EUPXS(XS_URI__XS__sftp_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS__sftp_new) { xs::throw_guard(cv, [=]() 1 0 1
961 {
962 1 dVAR; dXSARGS;
963 1 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 1 0 1
if (items < 1 || items > 3) 0 1 1
964 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
965 {
966 URI::sftp * RETVAL;
967 1 SV* CLASS = ST(0)
968 ;
969 1 string url;
970 int flags;
971  
972 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 1 1
973 0 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 0 0 0
974 else {
975 { STRLEN __url_len;
976 1 const char* __url_buf = SvPV(ST(1), __url_len);
977 1 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 1 0 1
978 ;
979 }
980  
981 1 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 1 0 1
982 1 flags = 0;
983 else {
984 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
985 ;
986 }
987 #line 135 "xs/schemas.xsi"
988 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
989 PROTO = CLASS;
990 RETVAL = make_backref<URI::sftp>(url, flags);
991 #line 992 "xs/main_xsgen.cc"
992 {
993 SV * RETVALSV;
994 1 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 1 0 1
995 1 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 1 0 1
996 1 ST(0) = RETVALSV;
997 }
998 1 }
999 1 XSRETURN(1);
1000 1 }); }
1001  
1002  
1003 /* INCLUDE: Returning to 'URI.xsi' from 'schemas.xsi' */
1004  
1005 static U32 uxs_hashval;
1006  
1007  
1008 192 ▶XS_EUPXS(XS_URI__XS_new) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_new) { xs::throw_guard(cv, [=]() 96 0 96
1009 {
1010 96 dVAR; dXSARGS;
1011 96 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 96 0 96
if (items < 1 || items > 3) 0 96 96
1012 0 croak_xs_usage(cv, "CLASS, url= string(), flags= 0");
1013 {
1014 URI * RETVAL;
1015 96 SV* CLASS = ST(0)
1016 ;
1017 96 string url;
1018 int flags;
1019  
1020 96 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 1 95 96
1021 1 ▶ url = string();
Branch: 1 branch
BranchTrueFalseTotal
url = string(); 1 0 1
1022 else {
1023 { STRLEN __url_len;
1024 95 const char* __url_buf = SvPV(ST(1), __url_len);
1025 95 ▶ url.assign(__url_buf, __url_len); }
Branch: 1 branch
BranchTrueFalseTotal
url.assign(__url_buf, __url_len); } 95 0 95
1026 ;
1027 }
1028  
1029 96 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 86 10 96
1030 86 flags = 0;
1031 else {
1032 10 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 10 0 10
1033 ;
1034 }
1035 #line 25 "xs/URI.xsi"
1036 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
1037 PROTO = CLASS;
1038 PROTO = CLASS;
1039 RETVAL = make_backref<URI>(url, flags);
1040 #line 1041 "xs/main_xsgen.cc"
1041 {
1042 SV * RETVALSV;
1043 96 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 96 0 96
1044 96 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 96 0 96
1045 96 ST(0) = RETVALSV;
1046 }
1047 96 }
1048 96 XSRETURN(1);
1049 96 }); }
1050  
1051  
1052  
1053 118 ▶XS_EUPXS(XS_URI__XS_url) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_url) { xs::throw_guard(cv, [=]() 59 0 59
1054 {
1055 59 dVAR; dXSARGS;
1056 59 ▶ if (items < 1 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 3) 59 0 59
if (items < 1 || items > 3) 0 59 59
1057 0 croak_xs_usage(cv, "THIS, newval= NULL, flags= 0");
1058 {
1059 59 string RETVAL;
1060 59 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 59 0 59
dXSTARG; 0 0 0
1061 59 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 59 0 59
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 59 59
1062 ;
1063 SV* newval;
1064 int flags;
1065  
1066 59 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 59 0 59
1067 59 newval = NULL;
1068 else {
1069 0 newval = ST(1)
1070 ;
1071 }
1072  
1073 59 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 59 0 59
1074 59 flags = 0;
1075 else {
1076 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
1077 ;
1078 }
1079 #line 30 "xs/URI.xsi"
1080 if (newval) {
1081 THIS->assign(sv_defined(newval) ? xs::in<string>(newval) : "", flags);
1082 XSRETURN_UNDEF;
1083 }
1084 RETVAL = THIS->to_string();
1085 #line 1086 "xs/main_xsgen.cc"
1086 59 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 59 0 59
1087 59 ST(0) = TARG;
1088 59 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 59 0 59
1089 59 XSRETURN(1);
1090 59 }); }
1091  
1092  
1093  
1094 158 ▶XS_EUPXS(XS_URI__XS_scheme) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_scheme) { xs::throw_guard(cv, [=]() 74 0 74
1095 {
1096 79 dVAR; dXSARGS;
1097 79 dXSI32;
1098 79 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 79 0 79
if (items < 1 || items > 2) 0 79 79
1099 0 croak_xs_usage(cv, "THIS, newval= NULL");
1100 {
1101 79 string RETVAL;
1102 79 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 79 0 79
dXSTARG; 0 0 0
1103 79 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 79 0 79
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 79 79
1104 ;
1105 SV* newval;
1106  
1107 79 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 67 12 79
1108 67 newval = NULL;
1109 else {
1110 12 newval = ST(1)
1111 ;
1112 }
1113 #line 38 "xs/URI.xsi"
1114 if (newval) {
1115 THIS->scheme(sv_defined(newval) ? xs::in<string>(newval) : "");
1116 XSRETURN_UNDEF;
1117 }
1118 RETVAL = THIS->scheme();
1119 PERL_UNUSED_VAR(ix);
1120 #line 1121 "xs/main_xsgen.cc"
1121 67 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 67 0 67
1122 67 ST(0) = TARG;
1123 79 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 67 7 74
1124 67 XSRETURN(1);
1125 74 }); }
1126  
1127  
1128  
1129 118 ▶XS_EUPXS(XS_URI__XS_user_info) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_user_info) { xs::throw_guard(cv, [=]() 59 0 59
1130 {
1131 59 dVAR; dXSARGS;
1132 59 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 59 0 59
if (items < 1 || items > 2) 0 59 59
1133 0 croak_xs_usage(cv, "THIS, newval= NULL");
1134 {
1135 59 string RETVAL;
1136 59 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 59 0 59
dXSTARG; 0 0 0
1137 59 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 59 0 59
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 59 59
1138 ;
1139 SV* newval;
1140  
1141 59 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 59 0 59
1142 59 newval = NULL;
1143 else {
1144 0 newval = ST(1)
1145 ;
1146 }
1147 #line 47 "xs/URI.xsi"
1148 if (newval) {
1149 THIS->user_info(sv_defined(newval) ? xs::in<string>(newval) : "");
1150 XSRETURN_UNDEF;
1151 }
1152 RETVAL = THIS->user_info();
1153 #line 1154 "xs/main_xsgen.cc"
1154 59 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 59 0 59
1155 59 ST(0) = TARG;
1156 59 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 59 0 59
1157 59 XSRETURN(1);
1158 59 }); }
1159  
1160  
1161  
1162 134 ▶XS_EUPXS(XS_URI__XS_host) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_host) { xs::throw_guard(cv, [=]() 67 0 67
1163 {
1164 67 dVAR; dXSARGS;
1165 67 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 67 0 67
if (items < 1 || items > 2) 0 67 67
1166 0 croak_xs_usage(cv, "THIS, newval= NULL");
1167 {
1168 67 string RETVAL;
1169 67 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 67 0 67
dXSTARG; 0 0 0
1170 67 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 67 0 67
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 67 67
1171 ;
1172 SV* newval;
1173  
1174 67 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 64 3 67
1175 64 newval = NULL;
1176 else {
1177 3 newval = ST(1)
1178 ;
1179 }
1180 #line 55 "xs/URI.xsi"
1181 if (newval) {
1182 THIS->host(sv_defined(newval) ? xs::in<string>(newval) : "");
1183 XSRETURN_UNDEF;
1184 }
1185 RETVAL = THIS->host();
1186 #line 1187 "xs/main_xsgen.cc"
1187 64 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 64 0 64
1188 64 ST(0) = TARG;
1189 67 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 64 3 67
1190 64 XSRETURN(1);
1191 67 }); }
1192  
1193  
1194  
1195 38 ▶XS_EUPXS(XS_URI__XS_port) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_port) { xs::throw_guard(cv, [=]() 19 0 19
1196 {
1197 19 dVAR; dXSARGS;
1198 19 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 19 0 19
if (items < 1 || items > 2) 0 19 19
1199 0 croak_xs_usage(cv, "THIS, newval= NULL");
1200 {
1201 int RETVAL;
1202 19 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 19 0 19
1203 19 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 19 19
1204 ;
1205 SV* newval;
1206  
1207 19 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 17 2 19
1208 17 newval = NULL;
1209 else {
1210 2 newval = ST(1)
1211 ;
1212 }
1213 #line 63 "xs/URI.xsi"
1214 if (newval) {
1215 THIS->port(SvIV(newval));
1216 XSRETURN_UNDEF;
1217 }
1218 RETVAL = THIS->port();
1219 #line 1220 "xs/main_xsgen.cc"
1220 17 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 17 17
1221 17 ST(0) = TARG;
1222 }
1223 17 XSRETURN(1);
1224 19 }); }
1225  
1226  
1227  
1228 130 ▶XS_EUPXS(XS_URI__XS_path) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_path) { xs::throw_guard(cv, [=]() 65 0 65
1229 {
1230 65 dVAR; dXSARGS;
1231 65 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 65 0 65
if (items < 1 || items > 2) 0 65 65
1232 0 croak_xs_usage(cv, "THIS, newval= NULL");
1233 {
1234 65 string RETVAL;
1235 65 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 65 0 65
dXSTARG; 0 0 0
1236 65 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 65 0 65
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 65 65
1237 ;
1238 SV* newval;
1239  
1240 65 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 63 2 65
1241 63 newval = NULL;
1242 else {
1243 2 newval = ST(1)
1244 ;
1245 }
1246 #line 71 "xs/URI.xsi"
1247 if (newval) {
1248 THIS->path(sv_defined(newval) ? xs::in<string>(newval) : "");
1249 XSRETURN_UNDEF;
1250 }
1251 RETVAL = THIS->path();
1252 #line 1253 "xs/main_xsgen.cc"
1253 63 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 63 0 63
1254 63 ST(0) = TARG;
1255 65 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 63 2 65
1256 63 XSRETURN(1);
1257 65 }); }
1258  
1259  
1260  
1261 0 ▶XS_EUPXS(XS_URI__XS_path_info) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_path_info) { xs::throw_guard(cv, [=]() 0 0 0
1262 {
1263 0 dVAR; dXSARGS;
1264 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1265 0 croak_xs_usage(cv, "THIS");
1266 {
1267 0 string RETVAL;
1268 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
1269 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1270 ;
1271 #line 78 "xs/URI.xsi"
1272 RETVAL = THIS->path_info();
1273 #line 1274 "xs/main_xsgen.cc"
1274 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
1275 0 ST(0) = TARG;
1276 0 }
1277 0 XSRETURN(1);
1278 0 }); }
1279  
1280  
1281  
1282 152 ▶XS_EUPXS(XS_URI__XS_query_string) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_query_string) { xs::throw_guard(cv, [=]() 76 0 76
1283 {
1284 76 dVAR; dXSARGS;
1285 76 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 76 0 76
if (items < 1 || items > 2) 0 76 76
1286 0 croak_xs_usage(cv, "THIS, newval= NULL");
1287 {
1288 76 string RETVAL;
1289 76 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 76 0 76
dXSTARG; 0 0 0
1290 76 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 76 0 76
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 76 76
1291 ;
1292 SV* newval;
1293  
1294 76 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 72 4 76
1295 72 newval = NULL;
1296 else {
1297 4 newval = ST(1)
1298 ;
1299 }
1300 #line 81 "xs/URI.xsi"
1301 if (newval) {
1302 THIS->query_string(sv_defined(newval) ? xs::in<string>(newval) : "");
1303 XSRETURN_UNDEF;
1304 }
1305 RETVAL = THIS->query_string();
1306 #line 1307 "xs/main_xsgen.cc"
1307 72 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 72 0 72
1308 72 ST(0) = TARG;
1309 76 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 72 4 76
1310 72 XSRETURN(1);
1311 76 }); }
1312  
1313  
1314  
1315 2 ▶XS_EUPXS(XS_URI__XS_raw_query) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_raw_query) { xs::throw_guard(cv, [=]() 1 0 1
1316 {
1317 1 dVAR; dXSARGS;
1318 1 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 1 0 1
if (items < 1 || items > 2) 0 1 1
1319 0 croak_xs_usage(cv, "THIS, newval= NULL");
1320 {
1321 1 string RETVAL;
1322 1 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 1 0 1
dXSTARG; 0 0 0
1323 1 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 1 0 1
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 1 1
1324 ;
1325 SV* newval;
1326  
1327 1 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 1 0 1
1328 1 newval = NULL;
1329 else {
1330 0 newval = ST(1)
1331 ;
1332 }
1333 #line 89 "xs/URI.xsi"
1334 if (newval) {
1335 THIS->raw_query(sv_defined(newval) ? xs::in<string>(newval) : "");
1336 XSRETURN_UNDEF;
1337 }
1338 RETVAL = THIS->raw_query();
1339 #line 1340 "xs/main_xsgen.cc"
1340 1 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 1 0 1
1341 1 ST(0) = TARG;
1342 1 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 1 0 1
1343 1 XSRETURN(1);
1344 1 }); }
1345  
1346  
1347  
1348 16 ▶XS_EUPXS(XS_URI__XS_query) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_query) { xs::throw_guard(cv, [=]() 8 0 8
1349 {
1350 8 dVAR; dXSARGS;
1351 8 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 8 8
1352 0 croak_xs_usage(cv, "THIS, ...");
1353 {
1354 8 Ref RETVAL;
1355 8 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 8 0 8
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 8 8
1356 ;
1357 #line 97 "xs/URI.xsi"
1358 if (items > 1) {
1359 add_query_args(THIS, MARK+2, items-1, true);
1360 XSRETURN_UNDEF;
1361 }
1362 auto data = data_get(ST(0));
1363 RETVAL = data->query_hash(THIS);
1364 #line 1365 "xs/main_xsgen.cc"
1365 {
1366 SV * RETVALSV;
1367 6 RETVALSV = NULL;
1368 6 ▶ if (!RETVAL) XSRETURN_UNDEF;
Branch: 1 branch
BranchTrueFalseTotal
if (!RETVAL) XSRETURN_UNDEF; 0 6 6
1369 6 RETVALSV = RETVAL.detach();
1370 6 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 6 0 6
1371 6 ST(0) = RETVALSV;
1372 }
1373 8 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 6 2 8
1374 6 XSRETURN(1);
1375 8 }); }
1376  
1377  
1378  
1379 6 ▶XS_EUPXS(XS_URI__XS_add_query) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_add_query) { xs::throw_guard(cv, [=]() 3 0 3
1380 {
1381 3 dVAR; dXSARGS;
1382 3 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 3 3
1383 0 croak_xs_usage(cv, "THIS, ...");
1384 PERL_UNUSED_VAR(ax); /* -Wall */
1385 3 SP -= items;
1386 {
1387 3 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 3 3
1388 ;
1389 #line 106 "xs/URI.xsi"
1390 add_query_args(THIS, MARK+2, items-1);
1391 #line 1392 "xs/main_xsgen.cc"
1392 3 PUTBACK;
1393 3 return;
1394 }
1395 3 }); }
1396  
1397  
1398  
1399 34 ▶XS_EUPXS(XS_URI__XS_param) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_param) { xs::throw_guard(cv, [=]() 17 0 17
1400 {
1401 17 dVAR; dXSARGS;
1402 17 dXSI32;
1403 17 ▶ if (items < 2 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 2 || items > 3) 17 0 17
if (items < 2 || items > 3) 0 17 17
1404 0 croak_xs_usage(cv, "THIS, name, val= NULL");
1405 {
1406 17 string RETVAL;
1407 17 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 17 0 17
dXSTARG; 0 0 0
1408 17 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 17 0 17
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 17 17
1409 ;
1410 17 string_view name;
1411 SV* val;
1412  
1413 { STRLEN __name_len;
1414 17 const char* __name_buf = SvPV(ST(1), __name_len);
1415 17 name = decltype(name)(__name_buf, __name_len); }
1416 ;
1417  
1418 17 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 16 1 17
1419 16 val = NULL;
1420 else {
1421 1 val = ST(2)
1422 ;
1423 }
1424 #line 110 "xs/URI.xsi"
1425 if (val) {
1426 add_param(THIS, string(name), val, true);
1427 XSRETURN_UNDEF;
1428 }
1429 if (ix == 0) { // param method
1430 auto it = THIS->query().find(name);
1431 if (it == THIS->query().cend()) XSRETURN_UNDEF;
1432 RETVAL = it->second;
1433 } else { // multiparam method
1434 size_t nvals = THIS->query().count(name);
1435 switch (nvals) {
1436 case 0:
1437 XSRETURN_EMPTY; break;
1438 case 1:
1439 RETVAL = THIS->query().find(name)->second; break;
1440 default:
1441 SP -= items;
1442 EXTEND(SP, (int)nvals);
1443 const auto& query = THIS->query();
1444 auto pair = query.equal_range(name);
1445 for (auto it = pair.first; it != pair.second; ++it) mPUSHp(it->second.data(), it->second.length());
1446 XSRETURN(nvals);
1447 }
1448 }
1449 #line 1450 "xs/main_xsgen.cc"
1450 13 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 13 0 13
1451 13 ST(0) = TARG;
1452 17 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 13 4 17
1453 13 XSRETURN(1);
1454 17 }); }
1455  
1456  
1457  
1458 2 ▶XS_EUPXS(XS_URI__XS_nparam) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_nparam) { xs::throw_guard(cv, [=]() 1 0 1
1459 {
1460 1 dVAR; dXSARGS;
1461 1 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 1 1
1462 0 croak_xs_usage(cv, "THIS");
1463 {
1464 int RETVAL;
1465 1 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 1 0 1
1466 1 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 1 1
1467 ;
1468 #line 137 "xs/URI.xsi"
1469 RETVAL = THIS->query().size();
1470 #line 1471 "xs/main_xsgen.cc"
1471 1 ▶ TARGi((IV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGi((IV)RETVAL, 1); 0 1 1
1472 1 ST(0) = TARG;
1473 }
1474 1 XSRETURN(1);
1475 1 }); }
1476  
1477  
1478  
1479 0 ▶XS_EUPXS(XS_URI__XS_remove_param) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_remove_param) { xs::throw_guard(cv, [=]() 0 0 0
1480 {
1481 0 dVAR; dXSARGS;
1482 0 ▶ if (items != 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 2) 0 0 0
1483 0 croak_xs_usage(cv, "THIS, name");
1484 {
1485 size_t RETVAL;
1486 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
1487 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1488 ;
1489 0 string name;
1490  
1491 { STRLEN __name_len;
1492 0 const char* __name_buf = SvPV(ST(1), __name_len);
1493 0 ▶ name.assign(__name_buf, __name_len); }
Branch: 1 branch
BranchTrueFalseTotal
name.assign(__name_buf, __name_len); } 0 0 0
1494 ;
1495 #line 141 "xs/URI.xsi"
1496 RETVAL = THIS->query().erase(name);
1497 #line 1498 "xs/main_xsgen.cc"
1498 0 ▶ TARGu((UV)RETVAL, 1);
Branch: 2 branches
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 0 0
TARGu((UV)RETVAL, 1); 0 0 0
1499 0 ST(0) = TARG;
1500 0 }
1501 0 XSRETURN(1);
1502 0 }); }
1503  
1504  
1505  
1506 244 ▶XS_EUPXS(XS_URI__XS_fragment) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_fragment) { xs::throw_guard(cv, [=]() 122 0 122
1507 {
1508 122 dVAR; dXSARGS;
1509 122 dXSI32;
1510 122 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 122 0 122
if (items < 1 || items > 2) 0 122 122
1511 0 croak_xs_usage(cv, "THIS, newval= NULL");
1512 {
1513 122 string RETVAL;
1514 122 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 122 0 122
dXSTARG; 0 0 0
1515 122 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 122 0 122
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 122 122
1516 ;
1517 SV* newval;
1518  
1519 122 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 120 2 122
1520 120 newval = NULL;
1521 else {
1522 2 newval = ST(1)
1523 ;
1524 }
1525 #line 145 "xs/URI.xsi"
1526 if (newval) {
1527 THIS->fragment(sv_defined(newval) ? xs::in<string>(newval) : "");
1528 XSRETURN_UNDEF;
1529 }
1530 RETVAL = THIS->fragment();
1531 PERL_UNUSED_VAR(ix);
1532 #line 1533 "xs/main_xsgen.cc"
1533 120 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 120 0 120
1534 120 ST(0) = TARG;
1535 122 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 120 2 122
1536 120 XSRETURN(1);
1537 122 }); }
1538  
1539  
1540  
1541 16 ▶XS_EUPXS(XS_URI__XS_location) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_location) { xs::throw_guard(cv, [=]() 8 0 8
1542 {
1543 8 dVAR; dXSARGS;
1544 8 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 8 0 8
if (items < 1 || items > 2) 0 8 8
1545 0 croak_xs_usage(cv, "THIS, newval= NULL");
1546 {
1547 8 string RETVAL;
1548 8 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 8 0 8
dXSTARG; 0 0 0
1549 8 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 8 0 8
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 8 8
1550 ;
1551 SV* newval;
1552  
1553 8 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 6 2 8
1554 6 newval = NULL;
1555 else {
1556 2 newval = ST(1)
1557 ;
1558 }
1559 #line 154 "xs/URI.xsi"
1560 if (newval) {
1561 THIS->location(sv_defined(newval) ? xs::in<string>(newval) : "");
1562 XSRETURN_UNDEF;
1563 }
1564 RETVAL = THIS->location();
1565 #line 1566 "xs/main_xsgen.cc"
1566 6 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 6 0 6
1567 6 ST(0) = TARG;
1568 8 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 6 2 8
1569 6 XSRETURN(1);
1570 8 }); }
1571  
1572  
1573  
1574 126 ▶XS_EUPXS(XS_URI__XS_explicit_port) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_explicit_port) { xs::throw_guard(cv, [=]() 63 0 63
1575 {
1576 63 dVAR; dXSARGS;
1577 63 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 63 63
1578 0 croak_xs_usage(cv, "THIS");
1579 {
1580 uint16_t RETVAL;
1581 63 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 63 0 63
1582 63 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 63 63
1583 ;
1584 #line 161 "xs/URI.xsi"
1585 RETVAL = THIS->explicit_port();
1586 #line 1587 "xs/main_xsgen.cc"
1587 63 ▶ TARGu((UV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 63 63
1588 63 ST(0) = TARG;
1589 }
1590 63 XSRETURN(1);
1591 63 }); }
1592  
1593  
1594  
1595 0 ▶XS_EUPXS(XS_URI__XS_default_port) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_default_port) { xs::throw_guard(cv, [=]() 0 0 0
1596 {
1597 0 dVAR; dXSARGS;
1598 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1599 0 croak_xs_usage(cv, "THIS");
1600 {
1601 uint16_t RETVAL;
1602 0 ▶ dXSTARG;
Branch: 1 branch
BranchTrueFalseTotal
dXSTARG; 0 0 0
1603 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1604 ;
1605 #line 163 "xs/URI.xsi"
1606 RETVAL = THIS->default_port();
1607 #line 1608 "xs/main_xsgen.cc"
1608 0 ▶ TARGu((UV)RETVAL, 1);
Branch: 1 branch
BranchTrueFalseTotal
TARGu((UV)RETVAL, 1); 0 0 0
1609 0 ST(0) = TARG;
1610 }
1611 0 XSRETURN(1);
1612 0 }); }
1613  
1614  
1615  
1616 4 ▶XS_EUPXS(XS_URI__XS_explicit_location) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_explicit_location) { xs::throw_guard(cv, [=]() 2 0 2
1617 {
1618 2 dVAR; dXSARGS;
1619 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
1620 0 croak_xs_usage(cv, "THIS");
1621 {
1622 2 string RETVAL;
1623 2 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 2 0 2
dXSTARG; 0 0 0
1624 2 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 2 0 2
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 2 2
1625 ;
1626 #line 165 "xs/URI.xsi"
1627 RETVAL = THIS->explicit_location();
1628 #line 1629 "xs/main_xsgen.cc"
1629 2 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 2 0 2
1630 2 ST(0) = TARG;
1631 2 }
1632 2 XSRETURN(1);
1633 2 }); }
1634  
1635  
1636  
1637 4 ▶XS_EUPXS(XS_URI__XS_relative) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_relative) { xs::throw_guard(cv, [=]() 2 0 2
1638 {
1639 2 dVAR; dXSARGS;
1640 2 dXSI32;
1641 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
1642 0 croak_xs_usage(cv, "THIS");
1643 {
1644 2 string RETVAL;
1645 2 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 2 0 2
dXSTARG; 0 0 0
1646 2 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 2 0 2
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 2 2
1647 ;
1648 #line 168 "xs/URI.xsi"
1649 RETVAL = THIS->relative();
1650 PERL_UNUSED_VAR(ix);
1651 #line 1652 "xs/main_xsgen.cc"
1652 2 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 2 0 2
1653 2 ST(0) = TARG;
1654 2 }
1655 2 XSRETURN(1);
1656 2 }); }
1657  
1658  
1659  
1660 486 ▶XS_EUPXS(XS_URI__XS_to_string) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_to_string) { xs::throw_guard(cv, [=]() 243 0 243
1661 {
1662 243 dVAR; dXSARGS;
1663 243 dXSI32;
1664 243 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 243 243
1665 0 croak_xs_usage(cv, "THIS, ...");
1666 {
1667 243 string RETVAL;
1668 243 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 178 65 243
dXSTARG; 65 0 65
1669 243 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 243 0 243
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 243 243
1670 ;
1671 #line 173 "xs/URI.xsi"
1672 RETVAL = THIS->to_string();
1673 PERL_UNUSED_VAR(ix);
1674 #line 1675 "xs/main_xsgen.cc"
1675 243 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 243 0 243
1676 243 ST(0) = TARG;
1677 243 }
1678 243 XSRETURN(1);
1679 243 }); }
1680  
1681  
1682  
1683 26 ▶XS_EUPXS(XS_URI__XS_secure) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_secure) { xs::throw_guard(cv, [=]() 13 0 13
1684 {
1685 13 dVAR; dXSARGS;
1686 13 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 13 13
1687 0 croak_xs_usage(cv, "THIS");
1688 {
1689 bool RETVAL;
1690 13 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 13 13
1691 ;
1692 #line 177 "xs/URI.xsi"
1693 RETVAL = THIS->secure();
1694 #line 1695 "xs/main_xsgen.cc"
1695 13 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 5 8 13
1696 }
1697 13 XSRETURN(1);
1698 13 }); }
1699  
1700  
1701  
1702 30 ▶XS_EUPXS(XS_URI__XS_set) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_set) { xs::throw_guard(cv, [=]() 13 0 13
1703 {
1704 15 dVAR; dXSARGS;
1705 15 dXSI32;
1706 15 ▶ if (items < 2 || items > 3)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 2 || items > 3) 15 0 15
if (items < 2 || items > 3) 0 15 15
1707 0 croak_xs_usage(cv, "THIS, source, flags= 0");
1708 PERL_UNUSED_VAR(ax); /* -Wall */
1709 15 SP -= items;
1710 {
1711 15 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 15 0 15
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 15 15
1712 ;
1713 15 Sv source = ST(1)
1714 ;
1715 int flags;
1716  
1717 15 ▶ if (items < 3)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 3) 15 0 15
1718 15 flags = 0;
1719 else {
1720 0 ▶ flags = (int)SvIV(ST(2))
Branch: 1 branch
BranchTrueFalseTotal
flags = (int)SvIV(ST(2)) 0 0 0
1721 ;
1722 }
1723 #line 180 "xs/URI.xsi"
1724 PERL_UNUSED_VAR(ix);
1725 if (source.is_string()) THIS->assign(xs::in<string>(source), flags);
1726 else THIS->assign(*xs::in<xs::nn<const URI*>>(source));
1727 #line 1728 "xs/main_xsgen.cc"
1728 13 PUTBACK;
1729 26 return;
1730 15 }
1731 13 }); }
1732  
1733  
1734  
1735 60 ▶XS_EUPXS(XS_URI__XS_equals) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_equals) { xs::throw_guard(cv, [=]() 30 0 30
1736 {
1737 30 dVAR; dXSARGS;
1738 30 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 30 30
1739 0 croak_xs_usage(cv, "THIS, other, ...");
1740 {
1741 bool RETVAL;
1742 30 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 30 0 30
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 30 30
1743 ;
1744 30 Sv other = ST(1)
1745 ;
1746 #line 186 "xs/URI.xsi"
1747 if (other.is_string()) RETVAL = THIS->to_string() == xs::in<string_view>(other);
1748 else {
1749 Object obj = other;
1750 if (obj && obj.stash().isa("URI::XS")) RETVAL = THIS->equals(*xs::in<URI*>(obj));
1751 else RETVAL = false;
1752 }
1753 #line 1754 "xs/main_xsgen.cc"
1754 30 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 30 0 30
1755 30 }
1756 30 XSRETURN(1);
1757 30 }); }
1758  
1759  
1760  
1761 4 ▶XS_EUPXS(XS_URI__XS_clone) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_clone) { xs::throw_guard(cv, [=]() 2 0 2
1762 {
1763 2 dVAR; dXSARGS;
1764 2 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 2 2
1765 0 croak_xs_usage(cv, "THIS");
1766 {
1767 2 URISP RETVAL;
1768 2 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 2 0 2
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 2 2
1769 ;
1770 #line 195 "xs/URI.xsi"
1771 xs::Sv PROTO; PERL_UNUSED_VAR(PROTO);
1772 PROTO = Object(ST(0)).stash();
1773 if (dynamic_cast<URIStrict*>(THIS)) RETVAL = URI::create(*THIS);
1774 else RETVAL = new URI(*THIS);
1775 #line 1776 "xs/main_xsgen.cc"
1776 {
1777 SV * RETVALSV;
1778 2 ▶ RETVALSV = xs::out(RETVAL, PROTO).detach();
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = xs::out(RETVAL, PROTO).detach(); 2 0 2
1779 2 ▶ RETVALSV = sv_2mortal(RETVALSV);
Branch: 1 branch
BranchTrueFalseTotal
RETVALSV = sv_2mortal(RETVALSV); 2 0 2
1780 2 ST(0) = RETVALSV;
1781 }
1782 2 }
1783 2 XSRETURN(1);
1784 2 }); }
1785  
1786  
1787  
1788 16 ▶XS_EUPXS(XS_URI__XS_path_segments) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_path_segments) { xs::throw_guard(cv, [=]() 8 0 8
1789 {
1790 8 dVAR; dXSARGS;
1791 8 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 8 8
1792 0 croak_xs_usage(cv, "THIS, ...");
1793 PERL_UNUSED_VAR(ax); /* -Wall */
1794 8 SP -= items;
1795 {
1796 8 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 8 0 8
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 8 8
1797 ;
1798 #line 201 "xs/URI.xsi"
1799 if (items > 1) {
1800 std::vector<string_view> list;
1801 list.reserve(items-1);
1802 for (I32 i = 1; i < items; ++i) list.push_back(xs::in<string_view>(ST(i)));
1803 THIS->path_segments(list.cbegin(), list.cend());
1804 XSRETURN_EMPTY;
1805 }
1806 const std::vector<string> list = THIS->path_segments();
1807 EXTEND(SP, (int)list.size());
1808 for (auto it = list.begin(); it != list.end(); ++it) mPUSHp(it->data(), it->length());
1809 #line 1810 "xs/main_xsgen.cc"
1810 5 PUTBACK;
1811 5 return;
1812 5 }
1813 8 }); }
1814  
1815  
1816  
1817 0 ▶XS_EUPXS(XS_URI__XS_empty) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_empty) { xs::throw_guard(cv, [=]() 0 0 0
1818 {
1819 0 dVAR; dXSARGS;
1820 0 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 0 0
1821 0 croak_xs_usage(cv, "THIS");
1822 {
1823 bool RETVAL;
1824 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1825 ;
1826 #line 213 "xs/URI.xsi"
1827 RETVAL = THIS->empty();
1828 #line 1829 "xs/main_xsgen.cc"
1829 0 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 0 0 0
1830 }
1831 0 XSRETURN(1);
1832 0 }); }
1833  
1834  
1835  
1836 14 ▶XS_EUPXS(XS_URI__XS_to_bool) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_to_bool) { xs::throw_guard(cv, [=]() 7 0 7
1837 {
1838 7 dVAR; dXSARGS;
1839 7 ▶ if (items < 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 1) 0 7 7
1840 0 croak_xs_usage(cv, "THIS, ...");
1841 {
1842 bool RETVAL;
1843 7 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 1 branch
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 7 7
1844 ;
1845 #line 216 "xs/URI.xsi"
1846 RETVAL = !THIS->empty();
1847 #line 1848 "xs/main_xsgen.cc"
1848 7 ▶ ST(0) = boolSV(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
ST(0) = boolSV(RETVAL); 0 7 7
1849 }
1850 7 XSRETURN(1);
1851 7 }); }
1852  
1853  
1854  
1855 0 ▶XS_EUPXS(XS_URI__XS_user) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_user) { xs::throw_guard(cv, [=]() 0 0 0
1856 {
1857 0 dVAR; dXSARGS;
1858 0 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 0 0 0
if (items < 1 || items > 2) 0 0 0
1859 0 croak_xs_usage(cv, "THIS, newval= NULL");
1860 {
1861 0 string RETVAL;
1862 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
1863 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1864 ;
1865 SV* newval;
1866  
1867 0 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 0 0
1868 0 newval = NULL;
1869 else {
1870 0 newval = ST(1)
1871 ;
1872 }
1873 #line 220 "xs/URI.xsi"
1874 if (newval) {
1875 THIS->user(xs::in<string>(newval));
1876 XSRETURN_UNDEF;
1877 }
1878 RETVAL = THIS->user();
1879 #line 1880 "xs/main_xsgen.cc"
1880 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
1881 0 ST(0) = TARG;
1882 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
1883 0 XSRETURN(1);
1884 0 }); }
1885  
1886  
1887  
1888 0 ▶XS_EUPXS(XS_URI__XS_password) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_password) { xs::throw_guard(cv, [=]() 0 0 0
1889 {
1890 0 dVAR; dXSARGS;
1891 0 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 0 0 0
if (items < 1 || items > 2) 0 0 0
1892 0 croak_xs_usage(cv, "THIS, newval= NULL");
1893 {
1894 0 string RETVAL;
1895 0 ▶ dXSTARG;
Branch: 2 branches
BranchTrueFalseTotal
dXSTARG; 0 0 0
dXSTARG; 0 0 0
1896 0 ▶ URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS";
Branch: 2 branches
BranchTrueFalseTotal
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
URI* THIS = xs::in<URI *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; 0 0 0
1897 ;
1898 SV* newval;
1899  
1900 0 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 0 0 0
1901 0 newval = NULL;
1902 else {
1903 0 newval = ST(1)
1904 ;
1905 }
1906 #line 228 "xs/URI.xsi"
1907 if (newval) {
1908 THIS->password(xs::in<string>(newval));
1909 XSRETURN_UNDEF;
1910 }
1911 RETVAL = THIS->password();
1912 #line 1913 "xs/main_xsgen.cc"
1913 0 ▶ sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length());
Branch: 1 branch
BranchTrueFalseTotal
sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); 0 0 0
1914 0 ST(0) = TARG;
1915 0 ▶ }
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
1916 0 XSRETURN(1);
1917 0 }); }
1918  
1919  
1920 /* INCLUDE: Returning to 'encode.xsi' from 'URI.xsi' */
1921  
1922  
1923  
1924 8 ▶XS_EUPXS(XS_URI__XS_encode_uri_component) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_encode_uri_component) { xs::throw_guard(cv, [=]() 4 0 4
1925 {
1926 4 dVAR; dXSARGS;
1927 4 dXSI32;
1928 4 ▶ if (items < 1 || items > 2)
Branch: 2 branches
BranchTrueFalseTotal
if (items < 1 || items > 2) 4 0 4
if (items < 1 || items > 2) 0 4 4
1929 0 croak_xs_usage(cv, "input, plus= false");
1930 {
1931 SV * RETVAL;
1932 4 string_view input;
1933 bool plus;
1934  
1935 { STRLEN __input_len;
1936 4 const char* __input_buf = SvPV(ST(0), __input_len);
1937 4 input = decltype(input)(__input_buf, __input_len); }
1938 ;
1939  
1940 4 ▶ if (items < 2)
Branch: 1 branch
BranchTrueFalseTotal
if (items < 2) 3 1 4
1941 3 plus = false;
1942 else {
1943 1 ▶ plus = (bool)SvTRUE(ST(1))
Branch: 1 branch
BranchTrueFalseTotal
plus = (bool)SvTRUE(ST(1)) 1 0 1
1944 ;
1945 }
1946 #line 5 "xs/encode.xsi"
1947 RETVAL = newSV(input.length()*3 + 1);
1948 SvPOK_on(RETVAL);
1949 size_t rlen = encode_uri_component(input, SvPVX(RETVAL), plus ? URIComponent::query_param_plus : URIComponent::query_param);
1950 SvPVX(RETVAL)[rlen] = 0;
1951 SvCUR_set(RETVAL, rlen);
1952 PERL_UNUSED_VAR(ix);
1953 #line 1954 "xs/main_xsgen.cc"
1954 4 ▶ RETVAL = sv_2mortal(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = sv_2mortal(RETVAL); 4 0 4
1955 4 ST(0) = RETVAL;
1956 }
1957 4 XSRETURN(1);
1958 4 }); }
1959  
1960  
1961  
1962 8 ▶XS_EUPXS(XS_URI__XS_decode_uri_component) { xs::throw_guard(cv, [=]()
Branch: 1 branch
BranchTrueFalseTotal
XS_EUPXS(XS_URI__XS_decode_uri_component) { xs::throw_guard(cv, [=]() 4 0 4
1963 {
1964 4 dVAR; dXSARGS;
1965 4 dXSI32;
1966 4 ▶ if (items != 1)
Branch: 1 branch
BranchTrueFalseTotal
if (items != 1) 0 4 4
1967 0 croak_xs_usage(cv, "input");
1968 {
1969 SV * RETVAL;
1970 4 string_view input;
1971  
1972 { STRLEN __input_len;
1973 4 const char* __input_buf = SvPV(ST(0), __input_len);
1974 4 input = decltype(input)(__input_buf, __input_len); }
1975 ;
1976 #line 14 "xs/encode.xsi"
1977 RETVAL = newSV(input.length()+1);
1978 SvPOK_on(RETVAL);
1979 size_t rlen = decode_uri_component(input, SvPVX(RETVAL));
1980 SvPVX(RETVAL)[rlen] = 0;
1981 SvCUR_set(RETVAL, rlen);
1982 PERL_UNUSED_VAR(ix);
1983 #line 1984 "xs/main_xsgen.cc"
1984 4 ▶ RETVAL = sv_2mortal(RETVAL);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = sv_2mortal(RETVAL); 4 0 4
1985 4 ST(0) = RETVAL;
1986 }
1987 4 XSRETURN(1);
1988 4 }); }
1989  
1990  
1991 /* INCLUDE: Returning to 'main.xs' from 'encode.xsi' */
1992  
1993 #ifdef __cplusplus
1994 extern "C" {
1995 #endif
1996  
1997 26 ▶XS_EXTERNAL(boot_URI__XS) { xs::throw_guard(cv, [=]() mutable
Branch: 1 branch
BranchTrueFalseTotal
XS_EXTERNAL(boot_URI__XS) { xs::throw_guard(cv, [=]() mutable 13 0 13
1998 {
1999 #if PERL_VERSION_LE(5, 21, 5)
2000 dVAR; dXSARGS;
2001 #else
2002 13 dVAR; dXSBOOTARGSXSAPIVERCHK;
2003 #endif
2004 #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */
2005 char* file = __FILE__;
2006 #else
2007 13 const char* file = __FILE__;
2008 #endif
2009  
2010 PERL_UNUSED_VAR(file);
2011  
2012 PERL_UNUSED_VAR(cv); /* -W */
2013 PERL_UNUSED_VAR(items); /* -W */
2014 #if PERL_VERSION_LE(5, 21, 5)
2015 XS_VERSION_BOOTCHECK;
2016 # ifdef XS_APIVERSION_BOOTCHECK
2017 XS_APIVERSION_BOOTCHECK;
2018 # endif
2019 #endif
2020  
2021 {
2022 CV * cv;
2023  
2024 13 newXS_deffile("URI::XS::uri", XS_URI__XS_uri);
2025 13 newXS_deffile("URI::XS::register_scheme", XS_URI__XS_register_scheme);
2026 13 newXS_deffile("URI::XS::bench_parse", XS_URI__XS_bench_parse);
2027 13 newXS_deffile("URI::XS::test_parse", XS_URI__XS_test_parse);
2028 13 newXS_deffile("URI::XS::bench_parse_query", XS_URI__XS_bench_parse_query);
2029 13 newXS_deffile("URI::XS::bench_encode_uri_component", XS_URI__XS_bench_encode_uri_component);
2030 13 newXS_deffile("URI::XS::bench_decode_uri_component", XS_URI__XS_bench_decode_uri_component);
2031 13 newXS_deffile("URI::XS::HOOK_CLONE", XS_URI__XS_HOOK_CLONE);
2032 13 newXS_deffile("URI::XS::STORABLE_freeze", XS_URI__XS_STORABLE_freeze);
2033 13 newXS_deffile("URI::XS::STORABLE_attach", XS_URI__XS_STORABLE_attach);
2034 13 newXS_deffile("URI::XS::TO_JSON", XS_URI__XS_TO_JSON);
2035 13 newXS_deffile("URI::XS::http::new", XS_URI__XS__http_new);
2036 13 newXS_deffile("URI::XS::https::new", XS_URI__XS__https_new);
2037 13 newXS_deffile("URI::XS::ws::new", XS_URI__XS__ws_new);
2038 13 newXS_deffile("URI::XS::wss::new", XS_URI__XS__wss_new);
2039 13 newXS_deffile("URI::XS::ftp::new", XS_URI__XS__ftp_new);
2040 13 newXS_deffile("URI::XS::socks::new", XS_URI__XS__socks_new);
2041 13 newXS_deffile("URI::XS::ssh::new", XS_URI__XS__ssh_new);
2042 13 newXS_deffile("URI::XS::telnet::new", XS_URI__XS__telnet_new);
2043 13 newXS_deffile("URI::XS::sftp::new", XS_URI__XS__sftp_new);
2044 13 newXS_deffile("URI::XS::new", XS_URI__XS_new);
2045 13 newXS_deffile("URI::XS::url", XS_URI__XS_url);
2046 13 cv = newXS_deffile("URI::XS::proto", XS_URI__XS_scheme);
2047 13 XSANY.any_i32 = 1;
2048 13 cv = newXS_deffile("URI::XS::protocol", XS_URI__XS_scheme);
2049 13 XSANY.any_i32 = 2;
2050 13 cv = newXS_deffile("URI::XS::scheme", XS_URI__XS_scheme);
2051 13 XSANY.any_i32 = 0;
2052 13 newXS_deffile("URI::XS::user_info", XS_URI__XS_user_info);
2053 13 newXS_deffile("URI::XS::host", XS_URI__XS_host);
2054 13 newXS_deffile("URI::XS::port", XS_URI__XS_port);
2055 13 newXS_deffile("URI::XS::path", XS_URI__XS_path);
2056 13 newXS_deffile("URI::XS::path_info", XS_URI__XS_path_info);
2057 13 newXS_deffile("URI::XS::query_string", XS_URI__XS_query_string);
2058 13 newXS_deffile("URI::XS::raw_query", XS_URI__XS_raw_query);
2059 13 newXS_deffile("URI::XS::query", XS_URI__XS_query);
2060 13 newXS_deffile("URI::XS::add_query", XS_URI__XS_add_query);
2061 13 cv = newXS_deffile("URI::XS::multiparam", XS_URI__XS_param);
2062 13 XSANY.any_i32 = 1;
2063 13 cv = newXS_deffile("URI::XS::param", XS_URI__XS_param);
2064 13 XSANY.any_i32 = 0;
2065 13 newXS_deffile("URI::XS::nparam", XS_URI__XS_nparam);
2066 13 newXS_deffile("URI::XS::remove_param", XS_URI__XS_remove_param);
2067 13 cv = newXS_deffile("URI::XS::fragment", XS_URI__XS_fragment);
2068 13 XSANY.any_i32 = 0;
2069 13 cv = newXS_deffile("URI::XS::hash", XS_URI__XS_fragment);
2070 13 XSANY.any_i32 = 1;
2071 13 newXS_deffile("URI::XS::location", XS_URI__XS_location);
2072 13 newXS_deffile("URI::XS::explicit_port", XS_URI__XS_explicit_port);
2073 13 newXS_deffile("URI::XS::default_port", XS_URI__XS_default_port);
2074 13 newXS_deffile("URI::XS::explicit_location", XS_URI__XS_explicit_location);
2075 13 cv = newXS_deffile("URI::XS::rel", XS_URI__XS_relative);
2076 13 XSANY.any_i32 = 1;
2077 13 cv = newXS_deffile("URI::XS::relative", XS_URI__XS_relative);
2078 13 XSANY.any_i32 = 0;
2079 13 cv = newXS_deffile("URI::XS::as_string", XS_URI__XS_to_string);
2080 13 XSANY.any_i32 = 1;
2081 13 cv = newXS_deffile("URI::XS::to_string", XS_URI__XS_to_string);
2082 13 XSANY.any_i32 = 0;
2083 13 newXS_deffile("URI::XS::secure", XS_URI__XS_secure);
2084 13 cv = newXS_deffile("URI::XS::assign", XS_URI__XS_set);
2085 13 XSANY.any_i32 = 1;
2086 13 cv = newXS_deffile("URI::XS::set", XS_URI__XS_set);
2087 13 XSANY.any_i32 = 0;
2088 13 newXS_deffile("URI::XS::equals", XS_URI__XS_equals);
2089 13 newXS_deffile("URI::XS::clone", XS_URI__XS_clone);
2090 13 newXS_deffile("URI::XS::path_segments", XS_URI__XS_path_segments);
2091 13 newXS_deffile("URI::XS::empty", XS_URI__XS_empty);
2092 13 newXS_deffile("URI::XS::to_bool", XS_URI__XS_to_bool);
2093 13 newXS_deffile("URI::XS::user", XS_URI__XS_user);
2094 13 newXS_deffile("URI::XS::password", XS_URI__XS_password);
2095 13 cv = newXS_deffile("URI::XS::encodeURIComponent", XS_URI__XS_encode_uri_component);
2096 13 XSANY.any_i32 = 1;
2097 13 cv = newXS_deffile("URI::XS::encode_uri_component", XS_URI__XS_encode_uri_component);
2098 13 XSANY.any_i32 = 0;
2099 13 cv = newXS_deffile("URI::XS::decodeURIComponent", XS_URI__XS_decode_uri_component);
2100 13 XSANY.any_i32 = 1;
2101 13 cv = newXS_deffile("URI::XS::decode_uri_component", XS_URI__XS_decode_uri_component);
2102 13 ▶ XSANY.any_i32 = 0;
Branch: 1 branch
BranchTrueFalseTotal
XSANY.any_i32 = 0; 13 0 13
2103 }
2104  
2105 /* Initialisation Section */
2106  
2107 #line 131 "xs/main.xs"
2108 {
2109 data_marker.svt_free = data_free;
2110  
2111 xs::at_perl_destroy([]{
2112 uri_class_map.clear();
2113 });
2114 }
2115  
2116 #line 4 "xs/schemas.xsi"
2117 {
2118 Stash s("URI::XS::http", GV_ADD);
2119 s.inherit("URI::XS");
2120 register_perl_scheme("http", s.name());
2121 }
2122  
2123 #line 20 "xs/schemas.xsi"
2124 {
2125 Stash s("URI::XS::https", GV_ADD);
2126 s.inherit("URI::XS::http");
2127 register_perl_scheme("https", s.name());
2128 }
2129  
2130 #line 36 "xs/schemas.xsi"
2131 {
2132 Stash s("URI::XS::ws", GV_ADD);
2133 s.inherit("URI::XS");
2134 register_perl_scheme("ws", s.name());
2135 }
2136  
2137 #line 52 "xs/schemas.xsi"
2138 {
2139 Stash s("URI::XS::wss", GV_ADD);
2140 s.inherit("URI::XS::ws");
2141 register_perl_scheme("wss", s.name());
2142 }
2143  
2144 #line 68 "xs/schemas.xsi"
2145 {
2146 Stash s("URI::XS::ftp", GV_ADD);
2147 s.inherit("URI::XS");
2148 register_perl_scheme("ftp", s.name());
2149 }
2150  
2151 #line 83 "xs/schemas.xsi"
2152 {
2153 Stash s("URI::XS::socks", GV_ADD);
2154 s.inherit("URI::XS");
2155 register_perl_scheme("socks5", s.name());
2156 }
2157  
2158 #line 98 "xs/schemas.xsi"
2159 {
2160 Stash s("URI::XS::ssh", GV_ADD);
2161 s.inherit("URI::XS");
2162 register_perl_scheme("ssh", s.name());
2163 }
2164  
2165 #line 113 "xs/schemas.xsi"
2166 {
2167 Stash s("URI::XS::telnet", GV_ADD);
2168 s.inherit("URI::XS");
2169 register_perl_scheme("telnet", s.name());
2170 }
2171  
2172 #line 128 "xs/schemas.xsi"
2173 {
2174 Stash s("URI::XS::sftp", GV_ADD);
2175 s.inherit("URI::XS::ssh");
2176 register_perl_scheme("sftp", s.name());
2177 }
2178  
2179 #line 8 "xs/URI.xsi"
2180 {
2181 Stash stash("URI::XS");
2182 PERL_HASH(uxs_hashval, "URI::XS", 7);
2183  
2184 xs::exp::create_constants(stash, {
2185 {"ALLOW_SUFFIX_REFERENCE", URI::Flags::allow_suffix_reference},
2186 {"QUERY_PARAM_SEMICOLON", URI::Flags::query_param_semicolon},
2187 {"ALLOW_EXTENDED_CHARS", URI::Flags::allow_extended_chars},
2188  
2189 // deprecated names
2190 {"ALLOW_LEADING_AUTHORITY", URI::Flags::allow_suffix_reference},
2191 {"PARAM_DELIM_SEMICOLON", URI::Flags::query_param_semicolon},
2192 });
2193 xs::exp::autoexport(stash);
2194 }
2195  
2196 #line 2197 "xs/main_xsgen.cc"
2197  
2198 /* End of Initialisation Section */
2199  
2200 #if PERL_VERSION_LE(5, 21, 5)
2201 # if PERL_VERSION_GE(5, 9, 0)
2202 if (PL_unitcheckav)
2203 call_list(PL_scopestack_ix, PL_unitcheckav);
2204 # endif
2205 XSRETURN_YES;
2206 #else
2207 13 Perl_xs_boot_epilog(aTHX_ ax);
2208 #endif
2209 52 ▶}); }
Branch: 9 branches
BranchTrueFalseTotal
}); } 13 0 13
}); } 13 0 13
}); } 13 0 13
}); } 13 0 13
}); } 13 0 13
}); } 13 0 13
}); } 13 0 13
}); } 0 0 0
}); } 0 0 0
2210  
2211 #ifdef __cplusplus
2212 }
2213 #endif
« xs/URI.xsi ↑ Summary src/xs/uri.h »