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