| 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 Framework.xs. Do not edit this file, edit Framework.xs instead. |
|
4
|
|
|
|
|
|
|
* |
|
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
|
6
|
|
|
|
|
|
|
* |
|
7
|
|
|
|
|
|
|
*/ |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "Framework.xs" |
|
10
|
|
|
|
|
|
|
#include |
|
11
|
|
|
|
|
|
|
#include |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
using namespace xs; |
|
14
|
|
|
|
|
|
|
using panda::ErrorCode; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#line 17 "Framework_xsgen.cc" |
|
17
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
|
18
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
|
19
|
|
|
|
|
|
|
#endif |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#ifndef dVAR |
|
22
|
|
|
|
|
|
|
# define dVAR dNOOP |
|
23
|
|
|
|
|
|
|
#endif |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
|
27
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
|
28
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
|
29
|
|
|
|
|
|
|
#endif |
|
30
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
|
31
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
|
32
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
|
33
|
|
|
|
|
|
|
#endif |
|
34
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
|
35
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
|
36
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
|
37
|
|
|
|
|
|
|
#endif |
|
38
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
|
39
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
|
40
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
|
41
|
|
|
|
|
|
|
#endif |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
|
44
|
|
|
|
|
|
|
* XS macro. |
|
45
|
|
|
|
|
|
|
* |
|
46
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
|
47
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
|
48
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
|
49
|
|
|
|
|
|
|
* |
|
50
|
|
|
|
|
|
|
* See XSUB.h in core! |
|
51
|
|
|
|
|
|
|
*/ |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
|
55
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
|
56
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
|
57
|
|
|
|
|
|
|
# undef XS_INTERNAL |
|
58
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
|
59
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
|
60
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
61
|
|
|
|
|
|
|
# endif |
|
62
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
|
63
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
|
64
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
|
65
|
|
|
|
|
|
|
# endif |
|
66
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
|
67
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
|
68
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
|
69
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
|
70
|
|
|
|
|
|
|
# else |
|
71
|
|
|
|
|
|
|
# ifdef __cplusplus |
|
72
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
|
73
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
|
74
|
|
|
|
|
|
|
# else |
|
75
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
|
76
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
77
|
|
|
|
|
|
|
# endif |
|
78
|
|
|
|
|
|
|
# endif |
|
79
|
|
|
|
|
|
|
# endif |
|
80
|
|
|
|
|
|
|
#endif |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
|
86
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
|
87
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
|
88
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
|
89
|
|
|
|
|
|
|
*/ |
|
90
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
|
91
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
|
92
|
|
|
|
|
|
|
#endif |
|
93
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
|
94
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
|
95
|
|
|
|
|
|
|
#endif |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
|
98
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
|
99
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
|
100
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
|
101
|
|
|
|
|
|
|
*/ |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
#undef XS_EUPXS |
|
104
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
|
105
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
|
106
|
|
|
|
|
|
|
#else |
|
107
|
|
|
|
|
|
|
/* default to internal */ |
|
108
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
|
109
|
|
|
|
|
|
|
#endif |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
112
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
|
115
|
|
|
|
|
|
|
STATIC void |
|
116
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
STATIC void |
|
119
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
|
120
|
|
|
|
|
|
|
{ |
|
121
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
if (gv) { |
|
126
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
|
127
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
|
128
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
if (hvname) |
|
131
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
|
132
|
|
|
|
|
|
|
else |
|
133
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
|
134
|
|
|
|
|
|
|
} else { |
|
135
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
|
136
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
|
137
|
|
|
|
|
|
|
} |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
#endif |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
|
146
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
|
147
|
|
|
|
|
|
|
*/ |
|
148
|
|
|
|
|
|
|
#ifdef newXS_flags |
|
149
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
|
150
|
|
|
|
|
|
|
#else |
|
151
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
|
152
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
155
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
|
156
|
|
|
|
|
|
|
#else |
|
157
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
|
158
|
|
|
|
|
|
|
#endif |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
#line 161 "Framework_xsgen.cc" |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
|
163
|
72
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework___at_perl_destroy) { xs::throw_guard(cv, [=]() |
|
164
|
|
|
|
|
|
|
{ |
|
165
|
36
|
|
|
|
|
|
dVAR; dXSARGS; |
|
166
|
36
|
50
|
|
|
|
|
if (items != 0) |
|
167
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
168
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
169
|
36
|
|
|
|
|
|
SP -= items; |
|
170
|
|
|
|
|
|
|
{ |
|
171
|
|
|
|
|
|
|
#line 15 "Framework.xs" |
|
172
|
|
|
|
|
|
|
xs::__call_at_perl_destroy(); |
|
173
|
|
|
|
|
|
|
#line 174 "Framework_xsgen.cc" |
|
174
|
36
|
|
|
|
|
|
PUTBACK; |
|
175
|
36
|
|
|
|
|
|
return; |
|
176
|
|
|
|
|
|
|
} |
|
177
|
36
|
50
|
|
|
|
|
}); } |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
|
|
181
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework___at_thread_create) { xs::throw_guard(cv, [=]() |
|
182
|
|
|
|
|
|
|
{ |
|
183
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
184
|
0
|
0
|
|
|
|
|
if (items != 0) |
|
185
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
186
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
187
|
0
|
|
|
|
|
|
SP -= items; |
|
188
|
|
|
|
|
|
|
{ |
|
189
|
|
|
|
|
|
|
#line 19 "Framework.xs" |
|
190
|
|
|
|
|
|
|
xs::__call_at_thread_create(); |
|
191
|
|
|
|
|
|
|
#line 192 "Framework_xsgen.cc" |
|
192
|
0
|
|
|
|
|
|
PUTBACK; |
|
193
|
0
|
|
|
|
|
|
return; |
|
194
|
|
|
|
|
|
|
} |
|
195
|
0
|
0
|
|
|
|
|
}); } |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
|
|
199
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_sv_payload_attach) { xs::throw_guard(cv, [=]() |
|
200
|
|
|
|
|
|
|
{ |
|
201
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
202
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
203
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv, payload"); |
|
204
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
205
|
2
|
|
|
|
|
|
SP -= items; |
|
206
|
|
|
|
|
|
|
{ |
|
207
|
4
|
50
|
|
|
|
|
Scalar sv = ST(0); |
|
208
|
2
|
50
|
|
|
|
|
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
209
|
0
|
|
|
|
|
|
; |
|
210
|
2
|
|
|
|
|
|
SV* payload = ST(1) |
|
211
|
|
|
|
|
|
|
; |
|
212
|
|
|
|
|
|
|
#line 23 "Framework.xs" |
|
213
|
|
|
|
|
|
|
sv.payload_detach(Sv::default_marker()); |
|
214
|
|
|
|
|
|
|
sv.payload_attach(payload, Sv::default_marker()); |
|
215
|
|
|
|
|
|
|
#line 216 "Framework_xsgen.cc" |
|
216
|
2
|
|
|
|
|
|
PUTBACK; |
|
217
|
4
|
|
|
|
|
|
return; |
|
218
|
|
|
|
|
|
|
} |
|
219
|
2
|
50
|
|
|
|
|
}); } |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
|
223
|
10
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_sv_payload_exists) { xs::throw_guard(cv, [=]() |
|
224
|
|
|
|
|
|
|
{ |
|
225
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
226
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
227
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
228
|
|
|
|
|
|
|
{ |
|
229
|
|
|
|
|
|
|
bool RETVAL; |
|
230
|
10
|
50
|
|
|
|
|
Scalar sv = ST(0); |
|
231
|
5
|
50
|
|
|
|
|
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
232
|
0
|
|
|
|
|
|
; |
|
233
|
|
|
|
|
|
|
#line 28 "Framework.xs" |
|
234
|
|
|
|
|
|
|
RETVAL = sv.payload_exists(Sv::default_marker()); |
|
235
|
|
|
|
|
|
|
#line 236 "Framework_xsgen.cc" |
|
236
|
5
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
237
|
|
|
|
|
|
|
} |
|
238
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
239
|
5
|
50
|
|
|
|
|
}); } |
|
240
|
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
|
|
243
|
6
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_sv_payload) { xs::throw_guard(cv, [=]() |
|
244
|
|
|
|
|
|
|
{ |
|
245
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
246
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
247
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
248
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
249
|
3
|
|
|
|
|
|
SP -= items; |
|
250
|
|
|
|
|
|
|
{ |
|
251
|
6
|
50
|
|
|
|
|
Scalar sv = ST(0); |
|
252
|
3
|
50
|
|
|
|
|
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
253
|
0
|
|
|
|
|
|
; |
|
254
|
|
|
|
|
|
|
#line 32 "Framework.xs" |
|
255
|
|
|
|
|
|
|
SV* ret = sv.payload(Sv::default_marker()).obj; |
|
256
|
|
|
|
|
|
|
if (!ret) XSRETURN_UNDEF; |
|
257
|
|
|
|
|
|
|
ST(0) = ret; |
|
258
|
|
|
|
|
|
|
XSRETURN(1); |
|
259
|
|
|
|
|
|
|
#line 260 "Framework_xsgen.cc" |
|
260
|
|
|
|
|
|
|
PUTBACK; |
|
261
|
|
|
|
|
|
|
return; |
|
262
|
|
|
|
|
|
|
} |
|
263
|
3
|
50
|
|
|
|
|
}); } |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
|
267
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_sv_payload_detach) { xs::throw_guard(cv, [=]() |
|
268
|
|
|
|
|
|
|
{ |
|
269
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
270
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
271
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
272
|
|
|
|
|
|
|
{ |
|
273
|
|
|
|
|
|
|
int RETVAL; |
|
274
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
275
|
2
|
50
|
|
|
|
|
Scalar sv = ST(0); |
|
276
|
1
|
50
|
|
|
|
|
if (!sv && SvOK(ST(0))) throw "arg is not a 'Scalar' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
277
|
0
|
|
|
|
|
|
; |
|
278
|
|
|
|
|
|
|
#line 39 "Framework.xs" |
|
279
|
|
|
|
|
|
|
RETVAL = sv.payload_detach(Sv::default_marker()); |
|
280
|
|
|
|
|
|
|
#line 281 "Framework_xsgen.cc" |
|
281
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
} |
|
283
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
284
|
1
|
50
|
|
|
|
|
}); } |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
|
288
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_rv_payload_attach) { xs::throw_guard(cv, [=]() |
|
289
|
|
|
|
|
|
|
{ |
|
290
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
291
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
292
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv, payload"); |
|
293
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
294
|
2
|
|
|
|
|
|
SP -= items; |
|
295
|
|
|
|
|
|
|
{ |
|
296
|
4
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
297
|
2
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
298
|
0
|
|
|
|
|
|
; |
|
299
|
2
|
|
|
|
|
|
SV* payload = ST(1) |
|
300
|
|
|
|
|
|
|
; |
|
301
|
|
|
|
|
|
|
#line 43 "Framework.xs" |
|
302
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
303
|
|
|
|
|
|
|
rv.value().payload_detach(Sv::default_marker()); |
|
304
|
|
|
|
|
|
|
rv.value().payload_attach(payload, Sv::default_marker()); |
|
305
|
|
|
|
|
|
|
#line 306 "Framework_xsgen.cc" |
|
306
|
2
|
|
|
|
|
|
PUTBACK; |
|
307
|
4
|
|
|
|
|
|
return; |
|
308
|
|
|
|
|
|
|
} |
|
309
|
2
|
50
|
|
|
|
|
}); } |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
|
|
313
|
10
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_rv_payload_exists) { xs::throw_guard(cv, [=]() |
|
314
|
|
|
|
|
|
|
{ |
|
315
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
316
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
317
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv"); |
|
318
|
|
|
|
|
|
|
{ |
|
319
|
|
|
|
|
|
|
bool RETVAL; |
|
320
|
10
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
321
|
5
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
322
|
0
|
|
|
|
|
|
; |
|
323
|
|
|
|
|
|
|
#line 49 "Framework.xs" |
|
324
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
325
|
|
|
|
|
|
|
RETVAL = rv.value().payload_exists(Sv::default_marker()); |
|
326
|
|
|
|
|
|
|
#line 327 "Framework_xsgen.cc" |
|
327
|
5
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
328
|
|
|
|
|
|
|
} |
|
329
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
330
|
5
|
50
|
|
|
|
|
}); } |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
|
|
334
|
6
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_rv_payload) { xs::throw_guard(cv, [=]() |
|
335
|
|
|
|
|
|
|
{ |
|
336
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
337
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
338
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv"); |
|
339
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
340
|
3
|
|
|
|
|
|
SP -= items; |
|
341
|
|
|
|
|
|
|
{ |
|
342
|
6
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
343
|
3
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
344
|
0
|
|
|
|
|
|
; |
|
345
|
|
|
|
|
|
|
#line 54 "Framework.xs" |
|
346
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
347
|
|
|
|
|
|
|
SV* ret = rv.value().payload(Sv::default_marker()).obj; |
|
348
|
|
|
|
|
|
|
if (!ret) XSRETURN_UNDEF; |
|
349
|
|
|
|
|
|
|
ST(0) = ret; |
|
350
|
|
|
|
|
|
|
XSRETURN(1); |
|
351
|
|
|
|
|
|
|
#line 352 "Framework_xsgen.cc" |
|
352
|
|
|
|
|
|
|
PUTBACK; |
|
353
|
|
|
|
|
|
|
return; |
|
354
|
|
|
|
|
|
|
} |
|
355
|
3
|
50
|
|
|
|
|
}); } |
|
356
|
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
|
|
359
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_rv_payload_detach) { xs::throw_guard(cv, [=]() |
|
360
|
|
|
|
|
|
|
{ |
|
361
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
362
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
363
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv"); |
|
364
|
|
|
|
|
|
|
{ |
|
365
|
|
|
|
|
|
|
int RETVAL; |
|
366
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
367
|
2
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
368
|
1
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
369
|
0
|
|
|
|
|
|
; |
|
370
|
|
|
|
|
|
|
#line 62 "Framework.xs" |
|
371
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
372
|
|
|
|
|
|
|
RETVAL = rv.value().payload_detach(Sv::default_marker()); |
|
373
|
|
|
|
|
|
|
#line 374 "Framework_xsgen.cc" |
|
374
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
} |
|
376
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
377
|
1
|
50
|
|
|
|
|
}); } |
|
378
|
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
|
|
381
|
8
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_any_payload_attach) { xs::throw_guard(cv, [=]() |
|
382
|
|
|
|
|
|
|
{ |
|
383
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
384
|
4
|
50
|
|
|
|
|
if (items != 2) |
|
385
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv, payload"); |
|
386
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
387
|
4
|
|
|
|
|
|
SP -= items; |
|
388
|
|
|
|
|
|
|
{ |
|
389
|
8
|
|
|
|
|
|
Sv sv = ST(0) |
|
390
|
|
|
|
|
|
|
; |
|
391
|
4
|
|
|
|
|
|
SV* payload = ST(1) |
|
392
|
|
|
|
|
|
|
; |
|
393
|
|
|
|
|
|
|
#line 67 "Framework.xs" |
|
394
|
|
|
|
|
|
|
if (sv.is_ref()) sv = Ref(sv).value(); |
|
395
|
|
|
|
|
|
|
sv.payload_detach(Sv::default_marker()); |
|
396
|
|
|
|
|
|
|
sv.payload_attach(payload, Sv::default_marker()); |
|
397
|
|
|
|
|
|
|
#line 398 "Framework_xsgen.cc" |
|
398
|
4
|
|
|
|
|
|
PUTBACK; |
|
399
|
8
|
|
|
|
|
|
return; |
|
400
|
|
|
|
|
|
|
} |
|
401
|
4
|
50
|
|
|
|
|
}); } |
|
402
|
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
|
|
405
|
20
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_any_payload_exists) { xs::throw_guard(cv, [=]() |
|
406
|
|
|
|
|
|
|
{ |
|
407
|
10
|
|
|
|
|
|
dVAR; dXSARGS; |
|
408
|
10
|
50
|
|
|
|
|
if (items != 1) |
|
409
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
410
|
|
|
|
|
|
|
{ |
|
411
|
|
|
|
|
|
|
bool RETVAL; |
|
412
|
20
|
|
|
|
|
|
Sv sv = ST(0) |
|
413
|
|
|
|
|
|
|
; |
|
414
|
|
|
|
|
|
|
#line 73 "Framework.xs" |
|
415
|
|
|
|
|
|
|
if (sv.is_ref()) sv = Ref(sv).value(); |
|
416
|
|
|
|
|
|
|
RETVAL = sv.payload_exists(Sv::default_marker()); |
|
417
|
|
|
|
|
|
|
#line 418 "Framework_xsgen.cc" |
|
418
|
10
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
419
|
|
|
|
|
|
|
} |
|
420
|
10
|
|
|
|
|
|
XSRETURN(1); |
|
421
|
10
|
50
|
|
|
|
|
}); } |
|
422
|
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
|
|
425
|
6
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_any_payload) { xs::throw_guard(cv, [=]() |
|
426
|
|
|
|
|
|
|
{ |
|
427
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
428
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
429
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
430
|
|
|
|
|
|
|
{ |
|
431
|
|
|
|
|
|
|
SV * RETVAL; |
|
432
|
3
|
|
|
|
|
|
Sv sv = ST(0) |
|
433
|
|
|
|
|
|
|
; |
|
434
|
|
|
|
|
|
|
#line 78 "Framework.xs" |
|
435
|
|
|
|
|
|
|
if (sv.is_ref()) sv = Ref(sv).value(); |
|
436
|
|
|
|
|
|
|
SV* ret = sv.payload(Sv::default_marker()).obj; |
|
437
|
|
|
|
|
|
|
if (!ret) XSRETURN_UNDEF; |
|
438
|
|
|
|
|
|
|
ST(0) = ret; |
|
439
|
|
|
|
|
|
|
XSRETURN(1); |
|
440
|
|
|
|
|
|
|
#line 441 "Framework_xsgen.cc" |
|
441
|
|
|
|
|
|
|
RETVAL = sv_2mortal(RETVAL); |
|
442
|
|
|
|
|
|
|
ST(0) = RETVAL; |
|
443
|
|
|
|
|
|
|
} |
|
444
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
445
|
3
|
50
|
|
|
|
|
}); } |
|
446
|
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
|
|
449
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_any_payload_detach) { xs::throw_guard(cv, [=]() |
|
450
|
|
|
|
|
|
|
{ |
|
451
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
452
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
453
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "sv"); |
|
454
|
|
|
|
|
|
|
{ |
|
455
|
|
|
|
|
|
|
int RETVAL; |
|
456
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
457
|
4
|
|
|
|
|
|
Sv sv = ST(0) |
|
458
|
|
|
|
|
|
|
; |
|
459
|
|
|
|
|
|
|
#line 86 "Framework.xs" |
|
460
|
|
|
|
|
|
|
if (sv.is_ref()) sv = Ref(sv).value(); |
|
461
|
|
|
|
|
|
|
RETVAL = sv.payload_detach(Sv::default_marker()); |
|
462
|
|
|
|
|
|
|
#line 463 "Framework_xsgen.cc" |
|
463
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
} |
|
465
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
466
|
2
|
50
|
|
|
|
|
}); } |
|
467
|
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
|
|
470
|
12
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_obj2hv) { xs::throw_guard(cv, [=]() |
|
471
|
|
|
|
|
|
|
{ |
|
472
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
473
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
474
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv"); |
|
475
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
476
|
6
|
|
|
|
|
|
SP -= items; |
|
477
|
|
|
|
|
|
|
{ |
|
478
|
12
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
479
|
6
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
480
|
0
|
|
|
|
|
|
; |
|
481
|
|
|
|
|
|
|
#line 91 "Framework.xs" |
|
482
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
483
|
|
|
|
|
|
|
auto sv = rv.value(); |
|
484
|
|
|
|
|
|
|
if (SvOK(sv)) throw "only references to undefs can be upgraded"; |
|
485
|
|
|
|
|
|
|
sv.upgrade(SVt_PVHV); |
|
486
|
|
|
|
|
|
|
#line 487 "Framework_xsgen.cc" |
|
487
|
4
|
|
|
|
|
|
PUTBACK; |
|
488
|
8
|
|
|
|
|
|
return; |
|
489
|
|
|
|
|
|
|
} |
|
490
|
6
|
50
|
|
|
|
|
}); } |
|
491
|
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
|
|
494
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework_obj2av) { xs::throw_guard(cv, [=]() |
|
495
|
|
|
|
|
|
|
{ |
|
496
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
497
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
498
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "rv"); |
|
499
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
500
|
2
|
|
|
|
|
|
SP -= items; |
|
501
|
|
|
|
|
|
|
{ |
|
502
|
4
|
50
|
|
|
|
|
Ref rv = ST(0); |
|
503
|
2
|
50
|
|
|
|
|
if (!rv && SvOK(ST(0))) throw "arg is not a 'Ref' value" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
504
|
0
|
|
|
|
|
|
; |
|
505
|
|
|
|
|
|
|
#line 98 "Framework.xs" |
|
506
|
|
|
|
|
|
|
if (!rv) throw "argument is not a reference"; |
|
507
|
|
|
|
|
|
|
auto sv = rv.value(); |
|
508
|
|
|
|
|
|
|
if (SvOK(sv)) throw "only references to undefs can be upgraded"; |
|
509
|
|
|
|
|
|
|
sv.upgrade(SVt_PVAV); |
|
510
|
|
|
|
|
|
|
#line 511 "Framework_xsgen.cc" |
|
511
|
1
|
|
|
|
|
|
PUTBACK; |
|
512
|
2
|
|
|
|
|
|
return; |
|
513
|
|
|
|
|
|
|
} |
|
514
|
2
|
50
|
|
|
|
|
}); } |
|
515
|
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
/* INCLUDE: Including 'Error.xsi' from 'Framework.xs' */ |
|
518
|
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
void register_error_constants(); // regerror.cc, because fucking xsubpp removes preprocessor directives |
|
520
|
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
|
|
522
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode_new) { xs::throw_guard(cv, [=]() |
|
523
|
|
|
|
|
|
|
{ |
|
524
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
525
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
526
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, ec, category"); |
|
527
|
|
|
|
|
|
|
{ |
|
528
|
1
|
|
|
|
|
|
std::error_code RETVAL; |
|
529
|
1
|
50
|
|
|
|
|
int ec = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
; |
|
531
|
1
|
50
|
|
|
|
|
const std::error_category* category = xs::in(ST(2)); |
|
532
|
|
|
|
|
|
|
; |
|
533
|
|
|
|
|
|
|
#line 13 "./Error.xsi" |
|
534
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
535
|
|
|
|
|
|
|
if (!category) throw "category required"; |
|
536
|
|
|
|
|
|
|
RETVAL = std::error_code(ec, *category); |
|
537
|
|
|
|
|
|
|
#line 538 "Framework_xsgen.cc" |
|
538
|
|
|
|
|
|
|
{ |
|
539
|
|
|
|
|
|
|
SV * RETVALSV; |
|
540
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
541
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
542
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
543
|
|
|
|
|
|
|
} |
|
544
|
|
|
|
|
|
|
} |
|
545
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
546
|
1
|
50
|
|
|
|
|
}); } |
|
547
|
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
|
|
550
|
252
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode_value) { xs::throw_guard(cv, [=]() |
|
551
|
|
|
|
|
|
|
{ |
|
552
|
126
|
|
|
|
|
|
dVAR; dXSARGS; |
|
553
|
126
|
50
|
|
|
|
|
if (items != 1) |
|
554
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
555
|
|
|
|
|
|
|
{ |
|
556
|
|
|
|
|
|
|
int RETVAL; |
|
557
|
126
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
558
|
126
|
50
|
|
|
|
|
std::error_code ec = xs::in(ST(0)); |
|
559
|
|
|
|
|
|
|
; |
|
560
|
|
|
|
|
|
|
#line 18 "./Error.xsi" |
|
561
|
|
|
|
|
|
|
RETVAL = ec.value(); |
|
562
|
|
|
|
|
|
|
#line 563 "Framework_xsgen.cc" |
|
563
|
126
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
} |
|
565
|
126
|
|
|
|
|
|
XSRETURN(1); |
|
566
|
126
|
50
|
|
|
|
|
}); } |
|
567
|
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
|
|
570
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode_category) { xs::throw_guard(cv, [=]() |
|
571
|
|
|
|
|
|
|
{ |
|
572
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
573
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
574
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
575
|
|
|
|
|
|
|
{ |
|
576
|
|
|
|
|
|
|
const std::error_category * RETVAL; |
|
577
|
2
|
50
|
|
|
|
|
std::error_code ec = xs::in(ST(0)); |
|
578
|
|
|
|
|
|
|
; |
|
579
|
|
|
|
|
|
|
#line 22 "./Error.xsi" |
|
580
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
581
|
|
|
|
|
|
|
RETVAL = &ec.category(); |
|
582
|
|
|
|
|
|
|
#line 583 "Framework_xsgen.cc" |
|
583
|
|
|
|
|
|
|
{ |
|
584
|
|
|
|
|
|
|
SV * RETVALSV; |
|
585
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
586
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
587
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
588
|
|
|
|
|
|
|
} |
|
589
|
|
|
|
|
|
|
} |
|
590
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
591
|
2
|
50
|
|
|
|
|
}); } |
|
592
|
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
|
|
595
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode_message) { xs::throw_guard(cv, [=]() |
|
596
|
|
|
|
|
|
|
{ |
|
597
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
598
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
599
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
600
|
|
|
|
|
|
|
{ |
|
601
|
4
|
|
|
|
|
|
std::string RETVAL; |
|
602
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
603
|
2
|
50
|
|
|
|
|
std::error_code ec = xs::in(ST(0)); |
|
604
|
|
|
|
|
|
|
; |
|
605
|
|
|
|
|
|
|
#line 26 "./Error.xsi" |
|
606
|
|
|
|
|
|
|
RETVAL = ec.message(); |
|
607
|
|
|
|
|
|
|
#line 608 "Framework_xsgen.cc" |
|
608
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
} |
|
610
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
611
|
2
|
50
|
|
|
|
|
}); } |
|
612
|
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
|
|
615
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode__op_string) { xs::throw_guard(cv, [=]() |
|
616
|
|
|
|
|
|
|
{ |
|
617
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
618
|
0
|
0
|
|
|
|
|
if (items < 1) |
|
619
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec, ..."); |
|
620
|
|
|
|
|
|
|
{ |
|
621
|
0
|
|
|
|
|
|
std::string RETVAL; |
|
622
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
623
|
0
|
0
|
|
|
|
|
std::error_code ec = xs::in(ST(0)); |
|
624
|
|
|
|
|
|
|
; |
|
625
|
|
|
|
|
|
|
#line 30 "./Error.xsi" |
|
626
|
|
|
|
|
|
|
RETVAL = ec.message(); |
|
627
|
|
|
|
|
|
|
RETVAL += " ("; |
|
628
|
|
|
|
|
|
|
RETVAL += std::to_string(ec.value()); |
|
629
|
|
|
|
|
|
|
RETVAL += ":"; |
|
630
|
|
|
|
|
|
|
RETVAL += ec.category().name(); |
|
631
|
|
|
|
|
|
|
RETVAL += ")"; |
|
632
|
|
|
|
|
|
|
#line 633 "Framework_xsgen.cc" |
|
633
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
} |
|
635
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
636
|
0
|
0
|
|
|
|
|
}); } |
|
637
|
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
|
|
640
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode__op_bool) { xs::throw_guard(cv, [=]() |
|
641
|
|
|
|
|
|
|
{ |
|
642
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
643
|
0
|
0
|
|
|
|
|
if (items < 1) |
|
644
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec, ..."); |
|
645
|
|
|
|
|
|
|
{ |
|
646
|
|
|
|
|
|
|
bool RETVAL; |
|
647
|
0
|
0
|
|
|
|
|
std::error_code ec = xs::in(ST(0)); |
|
648
|
|
|
|
|
|
|
; |
|
649
|
|
|
|
|
|
|
#line 39 "./Error.xsi" |
|
650
|
|
|
|
|
|
|
RETVAL = ec.value(); |
|
651
|
|
|
|
|
|
|
#line 652 "Framework_xsgen.cc" |
|
652
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
653
|
|
|
|
|
|
|
} |
|
654
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
655
|
0
|
0
|
|
|
|
|
}); } |
|
656
|
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
|
|
659
|
130
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCode__op_eq) { xs::throw_guard(cv, [=]() |
|
660
|
|
|
|
|
|
|
{ |
|
661
|
65
|
|
|
|
|
|
dVAR; dXSARGS; |
|
662
|
65
|
50
|
|
|
|
|
if (items < 2) |
|
663
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec1, sv_ec2, ..."); |
|
664
|
|
|
|
|
|
|
{ |
|
665
|
|
|
|
|
|
|
bool RETVAL; |
|
666
|
65
|
50
|
|
|
|
|
std::error_code ec1 = xs::in(ST(0)); |
|
667
|
|
|
|
|
|
|
; |
|
668
|
130
|
|
|
|
|
|
Sv sv_ec2 = ST(1) |
|
669
|
|
|
|
|
|
|
; |
|
670
|
|
|
|
|
|
|
#line 43 "./Error.xsi" |
|
671
|
|
|
|
|
|
|
if (sv_ec2.is_object_ref()) { |
|
672
|
|
|
|
|
|
|
Object ec2 = sv_ec2; |
|
673
|
|
|
|
|
|
|
auto class_name = ec2.stash().name(); |
|
674
|
|
|
|
|
|
|
if (class_name == "XS::ErrorCode") { |
|
675
|
|
|
|
|
|
|
RETVAL = ec1 & xs::in(sv_ec2); |
|
676
|
|
|
|
|
|
|
} else if (class_name == "XS::STL::ErrorCode") { |
|
677
|
|
|
|
|
|
|
RETVAL = ec1 == xs::in(sv_ec2); |
|
678
|
|
|
|
|
|
|
} else { |
|
679
|
|
|
|
|
|
|
RETVAL = false; |
|
680
|
|
|
|
|
|
|
} |
|
681
|
|
|
|
|
|
|
} else if (SvIOK(sv_ec2)) { |
|
682
|
|
|
|
|
|
|
int code = Simple(sv_ec2); |
|
683
|
|
|
|
|
|
|
RETVAL = ec1.value() == code; |
|
684
|
|
|
|
|
|
|
} else { |
|
685
|
|
|
|
|
|
|
RETVAL = false; |
|
686
|
|
|
|
|
|
|
} |
|
687
|
|
|
|
|
|
|
#line 688 "Framework_xsgen.cc" |
|
688
|
65
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
689
|
|
|
|
|
|
|
} |
|
690
|
65
|
|
|
|
|
|
XSRETURN(1); |
|
691
|
65
|
50
|
|
|
|
|
}); } |
|
692
|
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
|
|
695
|
6
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCategory_name) { xs::throw_guard(cv, [=]() |
|
696
|
|
|
|
|
|
|
{ |
|
697
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
698
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
699
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
700
|
|
|
|
|
|
|
{ |
|
701
|
|
|
|
|
|
|
const char * RETVAL; |
|
702
|
3
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
703
|
3
|
50
|
|
|
|
|
const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
; |
|
705
|
|
|
|
|
|
|
#line 64 "./Error.xsi" |
|
706
|
|
|
|
|
|
|
RETVAL = THIS->name(); |
|
707
|
|
|
|
|
|
|
#line 708 "Framework_xsgen.cc" |
|
708
|
3
|
50
|
|
|
|
|
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
} |
|
710
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
711
|
3
|
50
|
|
|
|
|
}); } |
|
712
|
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
|
|
715
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCategory_message) { xs::throw_guard(cv, [=]() |
|
716
|
|
|
|
|
|
|
{ |
|
717
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
718
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
719
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ec"); |
|
720
|
|
|
|
|
|
|
{ |
|
721
|
0
|
|
|
|
|
|
std::string RETVAL; |
|
722
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
723
|
0
|
0
|
|
|
|
|
const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
; |
|
725
|
0
|
0
|
|
|
|
|
int ec = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
; |
|
727
|
|
|
|
|
|
|
#line 66 "./Error.xsi" |
|
728
|
|
|
|
|
|
|
RETVAL = THIS->message(ec); |
|
729
|
|
|
|
|
|
|
#line 730 "Framework_xsgen.cc" |
|
730
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
} |
|
732
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
733
|
0
|
0
|
|
|
|
|
}); } |
|
734
|
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
|
|
737
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCategory__op_string) { xs::throw_guard(cv, [=]() |
|
738
|
|
|
|
|
|
|
{ |
|
739
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
740
|
0
|
0
|
|
|
|
|
if (items < 1) |
|
741
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
742
|
|
|
|
|
|
|
{ |
|
743
|
0
|
|
|
|
|
|
std::string RETVAL; |
|
744
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
745
|
0
|
0
|
|
|
|
|
const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
; |
|
747
|
|
|
|
|
|
|
#line 69 "./Error.xsi" |
|
748
|
|
|
|
|
|
|
RETVAL = THIS->name(); |
|
749
|
|
|
|
|
|
|
#line 750 "Framework_xsgen.cc" |
|
750
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
} |
|
752
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
753
|
0
|
0
|
|
|
|
|
}); } |
|
754
|
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
|
|
757
|
6
|
|
|
|
|
|
XS_EUPXS(XS_XS__STL__ErrorCategory__op_eq) { xs::throw_guard(cv, [=]() |
|
758
|
|
|
|
|
|
|
{ |
|
759
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
760
|
3
|
50
|
|
|
|
|
if (items < 2) |
|
761
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, oth, ..."); |
|
762
|
|
|
|
|
|
|
{ |
|
763
|
|
|
|
|
|
|
bool RETVAL; |
|
764
|
3
|
50
|
|
|
|
|
const std::error_category* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
; |
|
766
|
3
|
50
|
|
|
|
|
const std::error_category* oth = xs::in(ST(1)); |
|
767
|
|
|
|
|
|
|
; |
|
768
|
|
|
|
|
|
|
#line 73 "./Error.xsi" |
|
769
|
|
|
|
|
|
|
RETVAL = *THIS == *oth; |
|
770
|
|
|
|
|
|
|
#line 771 "Framework_xsgen.cc" |
|
771
|
3
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
772
|
|
|
|
|
|
|
} |
|
773
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
774
|
3
|
50
|
|
|
|
|
}); } |
|
775
|
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
|
|
778
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_new) { xs::throw_guard(cv, [=]() |
|
779
|
|
|
|
|
|
|
{ |
|
780
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
781
|
0
|
0
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
0
|
|
|
|
|
|
|
782
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, c, next= ErrorCode()"); |
|
783
|
|
|
|
|
|
|
{ |
|
784
|
0
|
|
|
|
|
|
ErrorCode RETVAL; |
|
785
|
0
|
0
|
|
|
|
|
std::error_code c = xs::in(ST(1)); |
|
786
|
|
|
|
|
|
|
; |
|
787
|
0
|
|
|
|
|
|
ErrorCode next; |
|
788
|
|
|
|
|
|
|
|
|
789
|
0
|
0
|
|
|
|
|
if (items < 3) |
|
790
|
0
|
|
|
|
|
|
next = ErrorCode(); |
|
791
|
|
|
|
|
|
|
else { |
|
792
|
0
|
0
|
|
|
|
|
next = xs::in(ST(2)); |
|
793
|
|
|
|
|
|
|
; |
|
794
|
|
|
|
|
|
|
} |
|
795
|
|
|
|
|
|
|
#line 80 "./Error.xsi" |
|
796
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
797
|
|
|
|
|
|
|
if (next) RETVAL = ErrorCode(c, next); |
|
798
|
|
|
|
|
|
|
else RETVAL = ErrorCode(c); |
|
799
|
|
|
|
|
|
|
#line 800 "Framework_xsgen.cc" |
|
800
|
|
|
|
|
|
|
{ |
|
801
|
|
|
|
|
|
|
SV * RETVALSV; |
|
802
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
803
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
804
|
0
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
805
|
|
|
|
|
|
|
} |
|
806
|
|
|
|
|
|
|
} |
|
807
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
808
|
0
|
0
|
|
|
|
|
}); } |
|
809
|
|
|
|
|
|
|
|
|
810
|
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
|
|
812
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_value) { xs::throw_guard(cv, [=]() |
|
813
|
|
|
|
|
|
|
{ |
|
814
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
815
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
816
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
817
|
|
|
|
|
|
|
{ |
|
818
|
|
|
|
|
|
|
int RETVAL; |
|
819
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
820
|
4
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
821
|
|
|
|
|
|
|
; |
|
822
|
|
|
|
|
|
|
#line 85 "./Error.xsi" |
|
823
|
|
|
|
|
|
|
RETVAL = ec.value(); |
|
824
|
|
|
|
|
|
|
#line 825 "Framework_xsgen.cc" |
|
825
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
} |
|
827
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
828
|
2
|
50
|
|
|
|
|
}); } |
|
829
|
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
|
|
831
|
|
|
|
|
|
|
|
|
832
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_category) { xs::throw_guard(cv, [=]() |
|
833
|
|
|
|
|
|
|
{ |
|
834
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
835
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
836
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
837
|
|
|
|
|
|
|
{ |
|
838
|
|
|
|
|
|
|
const std::error_category * RETVAL; |
|
839
|
2
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
840
|
|
|
|
|
|
|
; |
|
841
|
|
|
|
|
|
|
#line 89 "./Error.xsi" |
|
842
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
843
|
|
|
|
|
|
|
RETVAL = &ec.category(); |
|
844
|
|
|
|
|
|
|
#line 845 "Framework_xsgen.cc" |
|
845
|
|
|
|
|
|
|
{ |
|
846
|
|
|
|
|
|
|
SV * RETVALSV; |
|
847
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
848
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
849
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
850
|
|
|
|
|
|
|
} |
|
851
|
|
|
|
|
|
|
} |
|
852
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
853
|
1
|
50
|
|
|
|
|
}); } |
|
854
|
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
|
|
857
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_message) { xs::throw_guard(cv, [=]() |
|
858
|
|
|
|
|
|
|
{ |
|
859
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
860
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
861
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
862
|
|
|
|
|
|
|
{ |
|
863
|
2
|
|
|
|
|
|
std::string RETVAL; |
|
864
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
865
|
2
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
866
|
|
|
|
|
|
|
; |
|
867
|
|
|
|
|
|
|
#line 93 "./Error.xsi" |
|
868
|
|
|
|
|
|
|
RETVAL = ec.message(); |
|
869
|
|
|
|
|
|
|
#line 870 "Framework_xsgen.cc" |
|
870
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
871
|
|
|
|
|
|
|
} |
|
872
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
873
|
1
|
50
|
|
|
|
|
}); } |
|
874
|
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
|
|
877
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_code) { xs::throw_guard(cv, [=]() |
|
878
|
|
|
|
|
|
|
{ |
|
879
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
880
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
881
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
882
|
|
|
|
|
|
|
{ |
|
883
|
1
|
|
|
|
|
|
std::error_code RETVAL; |
|
884
|
2
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
885
|
|
|
|
|
|
|
; |
|
886
|
|
|
|
|
|
|
#line 97 "./Error.xsi" |
|
887
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
888
|
|
|
|
|
|
|
RETVAL = ec.code(); |
|
889
|
|
|
|
|
|
|
#line 890 "Framework_xsgen.cc" |
|
890
|
|
|
|
|
|
|
{ |
|
891
|
|
|
|
|
|
|
SV * RETVALSV; |
|
892
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
893
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
894
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
895
|
|
|
|
|
|
|
} |
|
896
|
|
|
|
|
|
|
} |
|
897
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
898
|
1
|
50
|
|
|
|
|
}); } |
|
899
|
|
|
|
|
|
|
|
|
900
|
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
|
|
902
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_next) { xs::throw_guard(cv, [=]() |
|
903
|
|
|
|
|
|
|
{ |
|
904
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
905
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
906
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec"); |
|
907
|
|
|
|
|
|
|
{ |
|
908
|
2
|
|
|
|
|
|
ErrorCode RETVAL; |
|
909
|
2
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
910
|
|
|
|
|
|
|
; |
|
911
|
|
|
|
|
|
|
#line 101 "./Error.xsi" |
|
912
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
913
|
|
|
|
|
|
|
RETVAL = ec.next(); |
|
914
|
|
|
|
|
|
|
#line 915 "Framework_xsgen.cc" |
|
915
|
|
|
|
|
|
|
{ |
|
916
|
|
|
|
|
|
|
SV * RETVALSV; |
|
917
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
918
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
919
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
920
|
|
|
|
|
|
|
} |
|
921
|
|
|
|
|
|
|
} |
|
922
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
923
|
1
|
50
|
|
|
|
|
}); } |
|
924
|
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
|
|
927
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode__op_string) { xs::throw_guard(cv, [=]() |
|
928
|
|
|
|
|
|
|
{ |
|
929
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
930
|
0
|
0
|
|
|
|
|
if (items < 1) |
|
931
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec, ..."); |
|
932
|
|
|
|
|
|
|
{ |
|
933
|
0
|
|
|
|
|
|
std::string RETVAL; |
|
934
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
935
|
0
|
0
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
|
|
0
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
; |
|
937
|
|
|
|
|
|
|
#line 105 "./Error.xsi" |
|
938
|
|
|
|
|
|
|
if (!ec) XSRETURN_UNDEF; |
|
939
|
|
|
|
|
|
|
RETVAL = ec.what(); |
|
940
|
|
|
|
|
|
|
#line 941 "Framework_xsgen.cc" |
|
941
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHp(RETVAL.data(), RETVAL.length()); |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
942
|
|
|
|
|
|
|
} |
|
943
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
944
|
0
|
0
|
|
|
|
|
}); } |
|
945
|
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
|
|
947
|
|
|
|
|
|
|
|
|
948
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode__op_bool) { xs::throw_guard(cv, [=]() |
|
949
|
|
|
|
|
|
|
{ |
|
950
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
951
|
0
|
0
|
|
|
|
|
if (items < 1) |
|
952
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec, ..."); |
|
953
|
|
|
|
|
|
|
{ |
|
954
|
|
|
|
|
|
|
bool RETVAL; |
|
955
|
0
|
0
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
956
|
|
|
|
|
|
|
; |
|
957
|
|
|
|
|
|
|
#line 110 "./Error.xsi" |
|
958
|
|
|
|
|
|
|
RETVAL = ec.value(); |
|
959
|
|
|
|
|
|
|
#line 960 "Framework_xsgen.cc" |
|
960
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
961
|
|
|
|
|
|
|
} |
|
962
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
963
|
0
|
0
|
|
|
|
|
}); } |
|
964
|
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
|
|
967
|
16
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode__op_eq) { xs::throw_guard(cv, [=]() |
|
968
|
|
|
|
|
|
|
{ |
|
969
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
970
|
8
|
50
|
|
|
|
|
if (items < 2) |
|
971
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec1, sv_ec2, ..."); |
|
972
|
|
|
|
|
|
|
{ |
|
973
|
|
|
|
|
|
|
bool RETVAL; |
|
974
|
16
|
50
|
|
|
|
|
ErrorCode ec1 = xs::in(ST(0)); |
|
975
|
|
|
|
|
|
|
; |
|
976
|
16
|
|
|
|
|
|
Sv sv_ec2 = ST(1) |
|
977
|
|
|
|
|
|
|
; |
|
978
|
|
|
|
|
|
|
#line 114 "./Error.xsi" |
|
979
|
|
|
|
|
|
|
if (sv_ec2.is_object_ref()) { |
|
980
|
|
|
|
|
|
|
Object ec2 = sv_ec2; |
|
981
|
|
|
|
|
|
|
auto class_name = ec2.stash().name(); |
|
982
|
|
|
|
|
|
|
if (class_name == "XS::ErrorCode") { |
|
983
|
|
|
|
|
|
|
RETVAL = ec1 == xs::in(sv_ec2); |
|
984
|
|
|
|
|
|
|
} else if (class_name == "XS::STL::ErrorCode") { |
|
985
|
|
|
|
|
|
|
RETVAL = ec1 & xs::in(sv_ec2); |
|
986
|
|
|
|
|
|
|
} else { |
|
987
|
|
|
|
|
|
|
RETVAL = false; |
|
988
|
|
|
|
|
|
|
} |
|
989
|
|
|
|
|
|
|
} else if (SvIOK(sv_ec2)) { |
|
990
|
|
|
|
|
|
|
int code = Simple(sv_ec2); |
|
991
|
|
|
|
|
|
|
RETVAL = ec1.value() == code; |
|
992
|
|
|
|
|
|
|
} else { |
|
993
|
|
|
|
|
|
|
RETVAL = false; |
|
994
|
|
|
|
|
|
|
} |
|
995
|
|
|
|
|
|
|
#line 996 "Framework_xsgen.cc" |
|
996
|
8
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
997
|
|
|
|
|
|
|
} |
|
998
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
999
|
8
|
50
|
|
|
|
|
}); } |
|
1000
|
|
|
|
|
|
|
|
|
1001
|
|
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
|
|
|
1003
|
2
|
|
|
|
|
|
XS_EUPXS(XS_XS__ErrorCode_contains) { xs::throw_guard(cv, [=]() |
|
1004
|
|
|
|
|
|
|
{ |
|
1005
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1006
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1007
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "ec, c"); |
|
1008
|
|
|
|
|
|
|
{ |
|
1009
|
|
|
|
|
|
|
bool RETVAL; |
|
1010
|
2
|
50
|
|
|
|
|
ErrorCode ec = xs::in(ST(0)); |
|
1011
|
|
|
|
|
|
|
; |
|
1012
|
1
|
50
|
|
|
|
|
std::error_code c = xs::in(ST(1)); |
|
1013
|
|
|
|
|
|
|
; |
|
1014
|
|
|
|
|
|
|
#line 133 "./Error.xsi" |
|
1015
|
|
|
|
|
|
|
RETVAL = ec.contains(c); |
|
1016
|
|
|
|
|
|
|
#line 1017 "Framework_xsgen.cc" |
|
1017
|
1
|
50
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1018
|
|
|
|
|
|
|
} |
|
1019
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1020
|
1
|
50
|
|
|
|
|
}); } |
|
1021
|
|
|
|
|
|
|
|
|
1022
|
|
|
|
|
|
|
|
|
1023
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Framework.xs' from 'Error.xsi' */ |
|
1024
|
|
|
|
|
|
|
|
|
1025
|
|
|
|
|
|
|
|
|
1026
|
|
|
|
|
|
|
/* INCLUDE: Including 'CallbackDispatcher.xsi' from 'Framework.xs' */ |
|
1027
|
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
|
|
1029
|
|
|
|
|
|
|
|
|
1030
|
24
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add) { xs::throw_guard(cv, [=]() |
|
1031
|
|
|
|
|
|
|
{ |
|
1032
|
12
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1033
|
12
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
1034
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv, back= false"); |
|
1035
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1036
|
12
|
|
|
|
|
|
SP -= items; |
|
1037
|
|
|
|
|
|
|
{ |
|
1038
|
12
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
; |
|
1040
|
24
|
50
|
|
|
|
|
Sub cv = ST(1); |
|
1041
|
12
|
50
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1042
|
0
|
|
|
|
|
|
; |
|
1043
|
|
|
|
|
|
|
bool back; |
|
1044
|
|
|
|
|
|
|
|
|
1045
|
12
|
50
|
|
|
|
|
if (items < 3) |
|
1046
|
12
|
|
|
|
|
|
back = false; |
|
1047
|
|
|
|
|
|
|
else { |
|
1048
|
0
|
0
|
|
|
|
|
back = (bool)SvTRUE(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1049
|
0
|
|
|
|
|
|
; |
|
1050
|
|
|
|
|
|
|
} |
|
1051
|
|
|
|
|
|
|
#line 4 "./CallbackDispatcher.xsi" |
|
1052
|
|
|
|
|
|
|
THIS->add(cv, back); |
|
1053
|
|
|
|
|
|
|
#line 1054 "Framework_xsgen.cc" |
|
1054
|
12
|
|
|
|
|
|
PUTBACK; |
|
1055
|
24
|
|
|
|
|
|
return; |
|
1056
|
|
|
|
|
|
|
} |
|
1057
|
12
|
50
|
|
|
|
|
}); } |
|
1058
|
|
|
|
|
|
|
|
|
1059
|
|
|
|
|
|
|
|
|
1060
|
|
|
|
|
|
|
|
|
1061
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_back) { xs::throw_guard(cv, [=]() |
|
1062
|
|
|
|
|
|
|
{ |
|
1063
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1064
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1065
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv"); |
|
1066
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1067
|
0
|
|
|
|
|
|
SP -= items; |
|
1068
|
|
|
|
|
|
|
{ |
|
1069
|
0
|
0
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
; |
|
1071
|
0
|
0
|
|
|
|
|
Sub cv = ST(1); |
|
1072
|
0
|
0
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1073
|
0
|
|
|
|
|
|
; |
|
1074
|
|
|
|
|
|
|
#line 6 "./CallbackDispatcher.xsi" |
|
1075
|
|
|
|
|
|
|
THIS->add_back(cv); |
|
1076
|
|
|
|
|
|
|
#line 1077 "Framework_xsgen.cc" |
|
1077
|
0
|
|
|
|
|
|
PUTBACK; |
|
1078
|
0
|
|
|
|
|
|
return; |
|
1079
|
|
|
|
|
|
|
} |
|
1080
|
0
|
0
|
|
|
|
|
}); } |
|
1081
|
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
|
|
1083
|
|
|
|
|
|
|
|
|
1084
|
48
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener) { xs::throw_guard(cv, [=]() |
|
1085
|
|
|
|
|
|
|
{ |
|
1086
|
24
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1087
|
24
|
50
|
|
|
|
|
if (items < 2 || items > 3) |
|
|
|
50
|
|
|
|
|
|
|
1088
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv, back= false"); |
|
1089
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1090
|
24
|
|
|
|
|
|
SP -= items; |
|
1091
|
|
|
|
|
|
|
{ |
|
1092
|
24
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1093
|
|
|
|
|
|
|
; |
|
1094
|
48
|
50
|
|
|
|
|
Sub cv = ST(1); |
|
1095
|
24
|
50
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1096
|
0
|
|
|
|
|
|
; |
|
1097
|
|
|
|
|
|
|
bool back; |
|
1098
|
|
|
|
|
|
|
|
|
1099
|
24
|
100
|
|
|
|
|
if (items < 3) |
|
1100
|
22
|
|
|
|
|
|
back = false; |
|
1101
|
|
|
|
|
|
|
else { |
|
1102
|
2
|
50
|
|
|
|
|
back = (bool)SvTRUE(ST(2)) |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1103
|
2
|
|
|
|
|
|
; |
|
1104
|
|
|
|
|
|
|
} |
|
1105
|
|
|
|
|
|
|
#line 8 "./CallbackDispatcher.xsi" |
|
1106
|
|
|
|
|
|
|
THIS->add_event_listener(cv, back); |
|
1107
|
|
|
|
|
|
|
#line 1108 "Framework_xsgen.cc" |
|
1108
|
24
|
|
|
|
|
|
PUTBACK; |
|
1109
|
48
|
|
|
|
|
|
return; |
|
1110
|
|
|
|
|
|
|
} |
|
1111
|
24
|
50
|
|
|
|
|
}); } |
|
1112
|
|
|
|
|
|
|
|
|
1113
|
|
|
|
|
|
|
|
|
1114
|
|
|
|
|
|
|
|
|
1115
|
0
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_add_event_listener_back) { xs::throw_guard(cv, [=]() |
|
1116
|
|
|
|
|
|
|
{ |
|
1117
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1118
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
1119
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv"); |
|
1120
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1121
|
0
|
|
|
|
|
|
SP -= items; |
|
1122
|
|
|
|
|
|
|
{ |
|
1123
|
0
|
0
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
; |
|
1125
|
0
|
0
|
|
|
|
|
Sub cv = ST(1); |
|
1126
|
0
|
0
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1127
|
0
|
|
|
|
|
|
; |
|
1128
|
|
|
|
|
|
|
#line 10 "./CallbackDispatcher.xsi" |
|
1129
|
|
|
|
|
|
|
THIS->add_event_listener_back(cv); |
|
1130
|
|
|
|
|
|
|
#line 1131 "Framework_xsgen.cc" |
|
1131
|
0
|
|
|
|
|
|
PUTBACK; |
|
1132
|
0
|
|
|
|
|
|
return; |
|
1133
|
|
|
|
|
|
|
} |
|
1134
|
0
|
0
|
|
|
|
|
}); } |
|
1135
|
|
|
|
|
|
|
|
|
1136
|
|
|
|
|
|
|
|
|
1137
|
|
|
|
|
|
|
|
|
1138
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove) { xs::throw_guard(cv, [=]() |
|
1139
|
|
|
|
|
|
|
{ |
|
1140
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1141
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1142
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv"); |
|
1143
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1144
|
2
|
|
|
|
|
|
SP -= items; |
|
1145
|
|
|
|
|
|
|
{ |
|
1146
|
2
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1147
|
|
|
|
|
|
|
; |
|
1148
|
4
|
50
|
|
|
|
|
Sub cv = ST(1); |
|
1149
|
2
|
50
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1150
|
0
|
|
|
|
|
|
; |
|
1151
|
|
|
|
|
|
|
#line 12 "./CallbackDispatcher.xsi" |
|
1152
|
|
|
|
|
|
|
THIS->remove(cv); |
|
1153
|
|
|
|
|
|
|
#line 1154 "Framework_xsgen.cc" |
|
1154
|
2
|
|
|
|
|
|
PUTBACK; |
|
1155
|
4
|
|
|
|
|
|
return; |
|
1156
|
|
|
|
|
|
|
} |
|
1157
|
2
|
50
|
|
|
|
|
}); } |
|
1158
|
|
|
|
|
|
|
|
|
1159
|
|
|
|
|
|
|
|
|
1160
|
|
|
|
|
|
|
|
|
1161
|
4
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_event_listener) { xs::throw_guard(cv, [=]() |
|
1162
|
|
|
|
|
|
|
{ |
|
1163
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1164
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1165
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, cv"); |
|
1166
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1167
|
2
|
|
|
|
|
|
SP -= items; |
|
1168
|
|
|
|
|
|
|
{ |
|
1169
|
2
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
; |
|
1171
|
4
|
50
|
|
|
|
|
Sub cv = ST(1); |
|
1172
|
2
|
50
|
|
|
|
|
if (!cv && SvOK(ST(1))) throw "arg is not a 'Sub' reference" |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1173
|
0
|
|
|
|
|
|
; |
|
1174
|
|
|
|
|
|
|
#line 14 "./CallbackDispatcher.xsi" |
|
1175
|
|
|
|
|
|
|
THIS->remove_event_listener(cv); |
|
1176
|
|
|
|
|
|
|
#line 1177 "Framework_xsgen.cc" |
|
1177
|
2
|
|
|
|
|
|
PUTBACK; |
|
1178
|
4
|
|
|
|
|
|
return; |
|
1179
|
|
|
|
|
|
|
} |
|
1180
|
2
|
50
|
|
|
|
|
}); } |
|
1181
|
|
|
|
|
|
|
|
|
1182
|
|
|
|
|
|
|
|
|
1183
|
|
|
|
|
|
|
|
|
1184
|
44
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_remove_all) { xs::throw_guard(cv, [=]() |
|
1185
|
|
|
|
|
|
|
{ |
|
1186
|
22
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1187
|
22
|
50
|
|
|
|
|
if (items != 1) |
|
1188
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1189
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1190
|
22
|
|
|
|
|
|
SP -= items; |
|
1191
|
|
|
|
|
|
|
{ |
|
1192
|
22
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1193
|
|
|
|
|
|
|
; |
|
1194
|
|
|
|
|
|
|
#line 16 "./CallbackDispatcher.xsi" |
|
1195
|
|
|
|
|
|
|
THIS->remove_all(); |
|
1196
|
|
|
|
|
|
|
#line 1197 "Framework_xsgen.cc" |
|
1197
|
22
|
|
|
|
|
|
PUTBACK; |
|
1198
|
22
|
|
|
|
|
|
return; |
|
1199
|
|
|
|
|
|
|
} |
|
1200
|
22
|
50
|
|
|
|
|
}); } |
|
1201
|
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
|
|
1203
|
|
|
|
|
|
|
|
|
1204
|
16
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_has_listeners) { xs::throw_guard(cv, [=]() |
|
1205
|
|
|
|
|
|
|
{ |
|
1206
|
8
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1207
|
8
|
50
|
|
|
|
|
if (items != 1) |
|
1208
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1209
|
|
|
|
|
|
|
{ |
|
1210
|
|
|
|
|
|
|
bool RETVAL; |
|
1211
|
8
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1212
|
|
|
|
|
|
|
; |
|
1213
|
|
|
|
|
|
|
#line 18 "./CallbackDispatcher.xsi" |
|
1214
|
|
|
|
|
|
|
RETVAL = THIS->has_listeners(); |
|
1215
|
|
|
|
|
|
|
#line 1216 "Framework_xsgen.cc" |
|
1216
|
8
|
100
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
1217
|
|
|
|
|
|
|
} |
|
1218
|
8
|
|
|
|
|
|
XSRETURN(1); |
|
1219
|
8
|
50
|
|
|
|
|
}); } |
|
1220
|
|
|
|
|
|
|
|
|
1221
|
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
|
|
1223
|
62
|
|
|
|
|
|
XS_EUPXS(XS_XS__Framework__CallbackDispatcher_call) { xs::throw_guard(cv, [=]() |
|
1224
|
|
|
|
|
|
|
{ |
|
1225
|
31
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1226
|
31
|
50
|
|
|
|
|
if (items < 1) |
|
1227
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, ..."); |
|
1228
|
|
|
|
|
|
|
{ |
|
1229
|
47
|
|
|
|
|
|
Sv RETVAL; |
|
1230
|
31
|
50
|
|
|
|
|
XSCallbackDispatcher* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1231
|
|
|
|
|
|
|
; |
|
1232
|
|
|
|
|
|
|
#line 21 "./CallbackDispatcher.xsi" |
|
1233
|
|
|
|
|
|
|
RETVAL = THIS->call(&ST(1), items - 1); |
|
1234
|
|
|
|
|
|
|
if (!RETVAL) XSRETURN_EMPTY; |
|
1235
|
|
|
|
|
|
|
#line 1236 "Framework_xsgen.cc" |
|
1236
|
|
|
|
|
|
|
{ |
|
1237
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1238
|
11
|
|
|
|
|
|
RETVALSV = NULL; |
|
1239
|
11
|
50
|
|
|
|
|
if (!RETVAL) XSRETURN_UNDEF; |
|
1240
|
11
|
50
|
|
|
|
|
if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
|
|
|
50
|
|
|
|
|
|
|
1241
|
0
|
|
|
|
|
|
else switch (RETVAL.type()) { |
|
1242
|
0
|
0
|
|
|
|
|
case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
1243
|
0
|
0
|
|
|
|
|
case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get()).push_on_stack(MARK)); |
|
|
|
0
|
|
|
|
|
|
|
1244
|
|
|
|
|
|
|
case SVt_PVCV: |
|
1245
|
|
|
|
|
|
|
case SVt_PVIO: |
|
1246
|
0
|
0
|
|
|
|
|
RETVALSV = newRV_noinc(RETVAL.detach()); |
|
1247
|
0
|
|
|
|
|
|
break; |
|
1248
|
0
|
|
|
|
|
|
default: throw "unknown type of Sv to return"; |
|
1249
|
|
|
|
|
|
|
} |
|
1250
|
11
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1251
|
26
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
1252
|
|
|
|
|
|
|
} |
|
1253
|
|
|
|
|
|
|
} |
|
1254
|
26
|
|
|
|
|
|
XSRETURN(1); |
|
1255
|
31
|
50
|
|
|
|
|
}); } |
|
1256
|
|
|
|
|
|
|
|
|
1257
|
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'Framework.xs' from 'CallbackDispatcher.xsi' */ |
|
1259
|
|
|
|
|
|
|
|
|
1260
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
1261
|
|
|
|
|
|
|
extern "C" |
|
1262
|
|
|
|
|
|
|
#endif |
|
1263
|
|
|
|
|
|
|
|
|
1264
|
72
|
|
|
|
|
|
XS_EXTERNAL(boot_XS__Framework) { xs::throw_guard(cv, [=]() mutable |
|
1265
|
|
|
|
|
|
|
{ |
|
1266
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
1267
|
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1268
|
|
|
|
|
|
|
#else |
|
1269
|
36
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
|
50
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
#endif |
|
1271
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
|
1272
|
|
|
|
|
|
|
char* file = __FILE__; |
|
1273
|
|
|
|
|
|
|
#else |
|
1274
|
36
|
|
|
|
|
|
const char* file = __FILE__; |
|
1275
|
|
|
|
|
|
|
#endif |
|
1276
|
|
|
|
|
|
|
|
|
1277
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
|
1278
|
|
|
|
|
|
|
|
|
1279
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
1280
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
|
1281
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
1282
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
|
1283
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
|
1284
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
|
1285
|
|
|
|
|
|
|
# endif |
|
1286
|
|
|
|
|
|
|
#endif |
|
1287
|
|
|
|
|
|
|
|
|
1288
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::__at_perl_destroy", XS_XS__Framework___at_perl_destroy); |
|
1289
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::__at_thread_create", XS_XS__Framework___at_thread_create); |
|
1290
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::sv_payload_attach", XS_XS__Framework_sv_payload_attach); |
|
1291
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::sv_payload_exists", XS_XS__Framework_sv_payload_exists); |
|
1292
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::sv_payload", XS_XS__Framework_sv_payload); |
|
1293
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::sv_payload_detach", XS_XS__Framework_sv_payload_detach); |
|
1294
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::rv_payload_attach", XS_XS__Framework_rv_payload_attach); |
|
1295
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::rv_payload_exists", XS_XS__Framework_rv_payload_exists); |
|
1296
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::rv_payload", XS_XS__Framework_rv_payload); |
|
1297
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::rv_payload_detach", XS_XS__Framework_rv_payload_detach); |
|
1298
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::any_payload_attach", XS_XS__Framework_any_payload_attach); |
|
1299
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::any_payload_exists", XS_XS__Framework_any_payload_exists); |
|
1300
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::any_payload", XS_XS__Framework_any_payload); |
|
1301
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::any_payload_detach", XS_XS__Framework_any_payload_detach); |
|
1302
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::obj2hv", XS_XS__Framework_obj2hv); |
|
1303
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::obj2av", XS_XS__Framework_obj2av); |
|
1304
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::new", XS_XS__STL__ErrorCode_new); |
|
1305
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::value", XS_XS__STL__ErrorCode_value); |
|
1306
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::category", XS_XS__STL__ErrorCode_category); |
|
1307
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::message", XS_XS__STL__ErrorCode_message); |
|
1308
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::_op_string", XS_XS__STL__ErrorCode__op_string); |
|
1309
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::_op_bool", XS_XS__STL__ErrorCode__op_bool); |
|
1310
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCode::_op_eq", XS_XS__STL__ErrorCode__op_eq); |
|
1311
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCategory::name", XS_XS__STL__ErrorCategory_name); |
|
1312
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCategory::message", XS_XS__STL__ErrorCategory_message); |
|
1313
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCategory::_op_string", XS_XS__STL__ErrorCategory__op_string); |
|
1314
|
36
|
|
|
|
|
|
newXS_deffile("XS::STL::ErrorCategory::_op_eq", XS_XS__STL__ErrorCategory__op_eq); |
|
1315
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::new", XS_XS__ErrorCode_new); |
|
1316
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::value", XS_XS__ErrorCode_value); |
|
1317
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::category", XS_XS__ErrorCode_category); |
|
1318
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::message", XS_XS__ErrorCode_message); |
|
1319
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::code", XS_XS__ErrorCode_code); |
|
1320
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::next", XS_XS__ErrorCode_next); |
|
1321
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::_op_string", XS_XS__ErrorCode__op_string); |
|
1322
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::_op_bool", XS_XS__ErrorCode__op_bool); |
|
1323
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::_op_eq", XS_XS__ErrorCode__op_eq); |
|
1324
|
36
|
|
|
|
|
|
newXS_deffile("XS::ErrorCode::contains", XS_XS__ErrorCode_contains); |
|
1325
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::add", XS_XS__Framework__CallbackDispatcher_add); |
|
1326
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::add_back", XS_XS__Framework__CallbackDispatcher_add_back); |
|
1327
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::add_event_listener", XS_XS__Framework__CallbackDispatcher_add_event_listener); |
|
1328
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::add_event_listener_back", XS_XS__Framework__CallbackDispatcher_add_event_listener_back); |
|
1329
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::remove", XS_XS__Framework__CallbackDispatcher_remove); |
|
1330
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::remove_event_listener", XS_XS__Framework__CallbackDispatcher_remove_event_listener); |
|
1331
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::remove_all", XS_XS__Framework__CallbackDispatcher_remove_all); |
|
1332
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::has_listeners", XS_XS__Framework__CallbackDispatcher_has_listeners); |
|
1333
|
36
|
|
|
|
|
|
newXS_deffile("XS::Framework::CallbackDispatcher::call", XS_XS__Framework__CallbackDispatcher_call); |
|
1334
|
|
|
|
|
|
|
|
|
1335
|
|
|
|
|
|
|
/* Initialisation Section */ |
|
1336
|
|
|
|
|
|
|
|
|
1337
|
|
|
|
|
|
|
#line 10 "Framework.xs" |
|
1338
|
|
|
|
|
|
|
{ |
|
1339
|
|
|
|
|
|
|
xs::typemap::object::init(); |
|
1340
|
|
|
|
|
|
|
} |
|
1341
|
|
|
|
|
|
|
|
|
1342
|
|
|
|
|
|
|
#line 8 "./Error.xsi" |
|
1343
|
|
|
|
|
|
|
{ |
|
1344
|
|
|
|
|
|
|
register_error_constants(); |
|
1345
|
|
|
|
|
|
|
} |
|
1346
|
|
|
|
|
|
|
|
|
1347
|
|
|
|
|
|
|
#line 1348 "Framework_xsgen.cc" |
|
1348
|
|
|
|
|
|
|
|
|
1349
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
|
1350
|
|
|
|
|
|
|
|
|
1351
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
1352
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
|
1353
|
|
|
|
|
|
|
if (PL_unitcheckav) |
|
1354
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
|
1355
|
|
|
|
|
|
|
# endif |
|
1356
|
|
|
|
|
|
|
XSRETURN_YES; |
|
1357
|
|
|
|
|
|
|
#else |
|
1358
|
36
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
|
1359
|
|
|
|
|
|
|
#endif |
|
1360
|
36
|
50
|
|
|
|
|
}); } |
|
1361
|
|
|
|
|
|
|
|