| 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 object.xs. Do not edit this file, edit object.xs instead. |
|
4
|
|
|
|
|
|
|
* |
|
5
|
|
|
|
|
|
|
* ANY CHANGES MADE HERE WILL BE LOST! |
|
6
|
|
|
|
|
|
|
* |
|
7
|
|
|
|
|
|
|
*/ |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#line 1 "t/typemap/object/object.xs" |
|
10
|
|
|
|
|
|
|
#include |
|
11
|
|
|
|
|
|
|
#include |
|
12
|
|
|
|
|
|
|
#include |
|
13
|
|
|
|
|
|
|
#include |
|
14
|
|
|
|
|
|
|
#include "../tmtest.h" |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
using namespace xs; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#line 19 "t/typemap/object/object_xsgen.cc" |
|
19
|
|
|
|
|
|
|
#ifndef PERL_UNUSED_VAR |
|
20
|
|
|
|
|
|
|
# define PERL_UNUSED_VAR(var) if (0) var = var |
|
21
|
|
|
|
|
|
|
#endif |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
#ifndef dVAR |
|
24
|
|
|
|
|
|
|
# define dVAR dNOOP |
|
25
|
|
|
|
|
|
|
#endif |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
/* This stuff is not part of the API! You have been warned. */ |
|
29
|
|
|
|
|
|
|
#ifndef PERL_VERSION_DECIMAL |
|
30
|
|
|
|
|
|
|
# define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
|
31
|
|
|
|
|
|
|
#endif |
|
32
|
|
|
|
|
|
|
#ifndef PERL_DECIMAL_VERSION |
|
33
|
|
|
|
|
|
|
# define PERL_DECIMAL_VERSION \ |
|
34
|
|
|
|
|
|
|
PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
|
35
|
|
|
|
|
|
|
#endif |
|
36
|
|
|
|
|
|
|
#ifndef PERL_VERSION_GE |
|
37
|
|
|
|
|
|
|
# define PERL_VERSION_GE(r,v,s) \ |
|
38
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
|
39
|
|
|
|
|
|
|
#endif |
|
40
|
|
|
|
|
|
|
#ifndef PERL_VERSION_LE |
|
41
|
|
|
|
|
|
|
# define PERL_VERSION_LE(r,v,s) \ |
|
42
|
|
|
|
|
|
|
(PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
|
43
|
|
|
|
|
|
|
#endif |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
/* XS_INTERNAL is the explicit static-linkage variant of the default |
|
46
|
|
|
|
|
|
|
* XS macro. |
|
47
|
|
|
|
|
|
|
* |
|
48
|
|
|
|
|
|
|
* XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
|
49
|
|
|
|
|
|
|
* "STATIC", ie. it exports XSUB symbols. You probably don't want that |
|
50
|
|
|
|
|
|
|
* for anything but the BOOT XSUB. |
|
51
|
|
|
|
|
|
|
* |
|
52
|
|
|
|
|
|
|
* See XSUB.h in core! |
|
53
|
|
|
|
|
|
|
*/ |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
/* TODO: This might be compatible further back than 5.10.0. */ |
|
57
|
|
|
|
|
|
|
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
|
58
|
|
|
|
|
|
|
# undef XS_EXTERNAL |
|
59
|
|
|
|
|
|
|
# undef XS_INTERNAL |
|
60
|
|
|
|
|
|
|
# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
|
61
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
|
62
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
63
|
|
|
|
|
|
|
# endif |
|
64
|
|
|
|
|
|
|
# if defined(__SYMBIAN32__) |
|
65
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
|
66
|
|
|
|
|
|
|
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
|
67
|
|
|
|
|
|
|
# endif |
|
68
|
|
|
|
|
|
|
# ifndef XS_EXTERNAL |
|
69
|
|
|
|
|
|
|
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
|
70
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
|
71
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
|
72
|
|
|
|
|
|
|
# else |
|
73
|
|
|
|
|
|
|
# ifdef __cplusplus |
|
74
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
|
75
|
|
|
|
|
|
|
# define XS_INTERNAL(name) static XSPROTO(name) |
|
76
|
|
|
|
|
|
|
# else |
|
77
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XSPROTO(name) |
|
78
|
|
|
|
|
|
|
# define XS_INTERNAL(name) STATIC XSPROTO(name) |
|
79
|
|
|
|
|
|
|
# endif |
|
80
|
|
|
|
|
|
|
# endif |
|
81
|
|
|
|
|
|
|
# endif |
|
82
|
|
|
|
|
|
|
#endif |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
/* perl >= 5.10.0 && perl <= 5.15.1 */ |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
/* The XS_EXTERNAL macro is used for functions that must not be static |
|
88
|
|
|
|
|
|
|
* like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
|
89
|
|
|
|
|
|
|
* macro defined, the best we can do is assume XS is the same. |
|
90
|
|
|
|
|
|
|
* Dito for XS_INTERNAL. |
|
91
|
|
|
|
|
|
|
*/ |
|
92
|
|
|
|
|
|
|
#ifndef XS_EXTERNAL |
|
93
|
|
|
|
|
|
|
# define XS_EXTERNAL(name) XS(name) |
|
94
|
|
|
|
|
|
|
#endif |
|
95
|
|
|
|
|
|
|
#ifndef XS_INTERNAL |
|
96
|
|
|
|
|
|
|
# define XS_INTERNAL(name) XS(name) |
|
97
|
|
|
|
|
|
|
#endif |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
/* Now, finally, after all this mess, we want an ExtUtils::ParseXS |
|
100
|
|
|
|
|
|
|
* internal macro that we're free to redefine for varying linkage due |
|
101
|
|
|
|
|
|
|
* to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
|
102
|
|
|
|
|
|
|
* XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
|
103
|
|
|
|
|
|
|
*/ |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
#undef XS_EUPXS |
|
106
|
|
|
|
|
|
|
#if defined(PERL_EUPXS_ALWAYS_EXPORT) |
|
107
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_EXTERNAL(name) |
|
108
|
|
|
|
|
|
|
#else |
|
109
|
|
|
|
|
|
|
/* default to internal */ |
|
110
|
|
|
|
|
|
|
# define XS_EUPXS(name) XS_INTERNAL(name) |
|
111
|
|
|
|
|
|
|
#endif |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
114
|
|
|
|
|
|
|
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
/* prototype to pass -Wmissing-prototypes */ |
|
117
|
|
|
|
|
|
|
STATIC void |
|
118
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params); |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
STATIC void |
|
121
|
|
|
|
|
|
|
S_croak_xs_usage(const CV *const cv, const char *const params) |
|
122
|
|
|
|
|
|
|
{ |
|
123
|
|
|
|
|
|
|
const GV *const gv = CvGV(cv); |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
if (gv) { |
|
128
|
|
|
|
|
|
|
const char *const gvname = GvNAME(gv); |
|
129
|
|
|
|
|
|
|
const HV *const stash = GvSTASH(gv); |
|
130
|
|
|
|
|
|
|
const char *const hvname = stash ? HvNAME(stash) : NULL; |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
if (hvname) |
|
133
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
|
134
|
|
|
|
|
|
|
else |
|
135
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
|
136
|
|
|
|
|
|
|
} else { |
|
137
|
|
|
|
|
|
|
/* Pants. I don't think that it should be possible to get here. */ |
|
138
|
|
|
|
|
|
|
Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
#define croak_xs_usage S_croak_xs_usage |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
#endif |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
/* NOTE: the prototype of newXSproto() is different in versions of perls, |
|
148
|
|
|
|
|
|
|
* so we define a portable version of newXSproto() |
|
149
|
|
|
|
|
|
|
*/ |
|
150
|
|
|
|
|
|
|
#ifdef newXS_flags |
|
151
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
|
152
|
|
|
|
|
|
|
#else |
|
153
|
|
|
|
|
|
|
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
|
154
|
|
|
|
|
|
|
#endif /* !defined(newXS_flags) */ |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
157
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
|
158
|
|
|
|
|
|
|
#else |
|
159
|
|
|
|
|
|
|
# define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
|
160
|
|
|
|
|
|
|
#endif |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
#line 163 "t/typemap/object/object_xsgen.cc" |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
/* INCLUDE: Including 'single.xsi' from 'object.xs' */ |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
template |
|
167
|
|
|
|
|
|
|
class _MyBase { |
|
168
|
|
|
|
|
|
|
public: |
|
169
|
|
|
|
|
|
|
int val; |
|
170
|
23
|
|
|
|
|
|
_MyBase (int arg) : val(arg) {} |
|
171
|
0
|
|
|
|
|
|
virtual _MyBase* clone () const { return new _MyBase(val); } |
|
172
|
72
|
50
|
|
|
|
|
virtual ~_MyBase () { dcnt.c++; } |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
}; |
|
174
|
|
|
|
|
|
|
using MyBase = _MyBase<0>; |
|
175
|
|
|
|
|
|
|
using PTRMyBase = _MyBase<1>; |
|
176
|
|
|
|
|
|
|
namespace xs { |
|
177
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
178
|
8
|
50
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyBase"; } |
|
179
|
|
|
|
|
|
|
}; |
|
180
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
181
|
8
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyBase"; } |
|
182
|
|
|
|
|
|
|
static MyBase* dup (const MyBase* obj) { return obj->clone(); } |
|
183
|
|
|
|
|
|
|
}; |
|
184
|
|
|
|
|
|
|
} |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
|
187
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBase_new) { xs::throw_guard(cv, [=]() |
|
188
|
|
|
|
|
|
|
{ |
|
189
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
190
|
4
|
50
|
|
|
|
|
if (items != 2) |
|
191
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
192
|
|
|
|
|
|
|
{ |
|
193
|
|
|
|
|
|
|
PTRMyBase * RETVAL; |
|
194
|
4
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
195
|
|
|
|
|
|
|
; |
|
196
|
4
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
; |
|
198
|
|
|
|
|
|
|
#line 30 "t/typemap/object/single.xsi" |
|
199
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
200
|
|
|
|
|
|
|
PROTO = CLASS; |
|
201
|
|
|
|
|
|
|
if (!arg) XSRETURN_UNDEF; |
|
202
|
|
|
|
|
|
|
RETVAL = new PTRMyBase(arg); |
|
203
|
|
|
|
|
|
|
#line 204 "t/typemap/object/object_xsgen.cc" |
|
204
|
|
|
|
|
|
|
{ |
|
205
|
|
|
|
|
|
|
SV * RETVALSV; |
|
206
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
207
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
208
|
4
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
209
|
|
|
|
|
|
|
} |
|
210
|
|
|
|
|
|
|
} |
|
211
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
212
|
4
|
50
|
|
|
|
|
}); } |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
|
216
|
42
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBase_val) { xs::throw_guard(cv, [=]() |
|
217
|
|
|
|
|
|
|
{ |
|
218
|
21
|
|
|
|
|
|
dVAR; dXSARGS; |
|
219
|
21
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
220
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
221
|
|
|
|
|
|
|
{ |
|
222
|
|
|
|
|
|
|
int RETVAL; |
|
223
|
21
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
224
|
21
|
100
|
|
|
|
|
PTRMyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
; |
|
226
|
|
|
|
|
|
|
SV* newval; |
|
227
|
|
|
|
|
|
|
|
|
228
|
5
|
50
|
|
|
|
|
if (items < 2) |
|
229
|
5
|
|
|
|
|
|
newval = NULL; |
|
230
|
|
|
|
|
|
|
else { |
|
231
|
0
|
|
|
|
|
|
newval = ST(1) |
|
232
|
0
|
|
|
|
|
|
; |
|
233
|
|
|
|
|
|
|
} |
|
234
|
|
|
|
|
|
|
#line 35 "t/typemap/object/single.xsi" |
|
235
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
236
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
237
|
|
|
|
|
|
|
#line 238 "t/typemap/object/object_xsgen.cc" |
|
238
|
5
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
} |
|
240
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
241
|
21
|
50
|
|
|
|
|
}); } |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
|
245
|
34
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBase_set_from) { xs::throw_guard(cv, [=]() |
|
246
|
|
|
|
|
|
|
{ |
|
247
|
17
|
|
|
|
|
|
dVAR; dXSARGS; |
|
248
|
17
|
50
|
|
|
|
|
if (items != 2) |
|
249
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
250
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
251
|
17
|
|
|
|
|
|
SP -= items; |
|
252
|
|
|
|
|
|
|
{ |
|
253
|
17
|
50
|
|
|
|
|
PTRMyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
; |
|
255
|
17
|
|
|
|
|
|
PTRMyBase* other = xs::in(ST(1)); |
|
256
|
|
|
|
|
|
|
; |
|
257
|
|
|
|
|
|
|
#line 40 "t/typemap/object/single.xsi" |
|
258
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
259
|
|
|
|
|
|
|
#line 260 "t/typemap/object/object_xsgen.cc" |
|
260
|
2
|
|
|
|
|
|
PUTBACK; |
|
261
|
2
|
|
|
|
|
|
return; |
|
262
|
|
|
|
|
|
|
} |
|
263
|
17
|
50
|
|
|
|
|
}); } |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
|
267
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBase_DESTROY) { xs::throw_guard(cv, [=]() |
|
268
|
|
|
|
|
|
|
{ |
|
269
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
270
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
271
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
272
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
273
|
5
|
|
|
|
|
|
SP -= items; |
|
274
|
|
|
|
|
|
|
{ |
|
275
|
5
|
50
|
|
|
|
|
PTRMyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
; |
|
277
|
|
|
|
|
|
|
#line 44 "t/typemap/object/single.xsi" |
|
278
|
|
|
|
|
|
|
dcnt.perl++; |
|
279
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
280
|
|
|
|
|
|
|
#line 281 "t/typemap/object/object_xsgen.cc" |
|
281
|
5
|
|
|
|
|
|
PUTBACK; |
|
282
|
5
|
|
|
|
|
|
return; |
|
283
|
|
|
|
|
|
|
} |
|
284
|
5
|
50
|
|
|
|
|
}); } |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
|
288
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBase_new) { xs::throw_guard(cv, [=]() |
|
289
|
|
|
|
|
|
|
{ |
|
290
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
291
|
5
|
50
|
|
|
|
|
if (items != 2) |
|
292
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
293
|
|
|
|
|
|
|
{ |
|
294
|
|
|
|
|
|
|
MyBase * RETVAL; |
|
295
|
5
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
296
|
|
|
|
|
|
|
; |
|
297
|
5
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
; |
|
299
|
|
|
|
|
|
|
#line 52 "t/typemap/object/single.xsi" |
|
300
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
301
|
|
|
|
|
|
|
PROTO = CLASS; |
|
302
|
|
|
|
|
|
|
if (!arg) XSRETURN_UNDEF; |
|
303
|
|
|
|
|
|
|
RETVAL = new MyBase(arg); |
|
304
|
|
|
|
|
|
|
#line 305 "t/typemap/object/object_xsgen.cc" |
|
305
|
|
|
|
|
|
|
{ |
|
306
|
|
|
|
|
|
|
SV * RETVALSV; |
|
307
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
308
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
309
|
5
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
310
|
|
|
|
|
|
|
} |
|
311
|
|
|
|
|
|
|
} |
|
312
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
313
|
5
|
50
|
|
|
|
|
}); } |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
|
317
|
50
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBase_val) { xs::throw_guard(cv, [=]() |
|
318
|
|
|
|
|
|
|
{ |
|
319
|
25
|
|
|
|
|
|
dVAR; dXSARGS; |
|
320
|
25
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
321
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
322
|
|
|
|
|
|
|
{ |
|
323
|
|
|
|
|
|
|
int RETVAL; |
|
324
|
25
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
325
|
25
|
100
|
|
|
|
|
MyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
; |
|
327
|
|
|
|
|
|
|
SV* newval; |
|
328
|
|
|
|
|
|
|
|
|
329
|
9
|
50
|
|
|
|
|
if (items < 2) |
|
330
|
9
|
|
|
|
|
|
newval = NULL; |
|
331
|
|
|
|
|
|
|
else { |
|
332
|
0
|
|
|
|
|
|
newval = ST(1) |
|
333
|
0
|
|
|
|
|
|
; |
|
334
|
|
|
|
|
|
|
} |
|
335
|
|
|
|
|
|
|
#line 57 "t/typemap/object/single.xsi" |
|
336
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
337
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
338
|
|
|
|
|
|
|
#line 339 "t/typemap/object/object_xsgen.cc" |
|
339
|
9
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
} |
|
341
|
9
|
|
|
|
|
|
XSRETURN(1); |
|
342
|
25
|
50
|
|
|
|
|
}); } |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
|
|
346
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBase_get_val) { xs::throw_guard(cv, [=]() |
|
347
|
|
|
|
|
|
|
{ |
|
348
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
349
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
350
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
351
|
|
|
|
|
|
|
{ |
|
352
|
|
|
|
|
|
|
int RETVAL; |
|
353
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
354
|
0
|
0
|
|
|
|
|
MyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
; |
|
356
|
|
|
|
|
|
|
#line 62 "t/typemap/object/single.xsi" |
|
357
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
358
|
|
|
|
|
|
|
#line 359 "t/typemap/object/object_xsgen.cc" |
|
359
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
} |
|
361
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
362
|
0
|
0
|
|
|
|
|
}); } |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
|
|
366
|
34
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBase_set_from) { xs::throw_guard(cv, [=]() |
|
367
|
|
|
|
|
|
|
{ |
|
368
|
17
|
|
|
|
|
|
dVAR; dXSARGS; |
|
369
|
17
|
50
|
|
|
|
|
if (items != 2) |
|
370
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
371
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
372
|
17
|
|
|
|
|
|
SP -= items; |
|
373
|
|
|
|
|
|
|
{ |
|
374
|
17
|
50
|
|
|
|
|
MyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
; |
|
376
|
17
|
|
|
|
|
|
MyBase* other = xs::in(ST(1)); |
|
377
|
|
|
|
|
|
|
; |
|
378
|
|
|
|
|
|
|
#line 66 "t/typemap/object/single.xsi" |
|
379
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
380
|
|
|
|
|
|
|
#line 381 "t/typemap/object/object_xsgen.cc" |
|
381
|
2
|
|
|
|
|
|
PUTBACK; |
|
382
|
2
|
|
|
|
|
|
return; |
|
383
|
|
|
|
|
|
|
} |
|
384
|
17
|
50
|
|
|
|
|
}); } |
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
|
|
388
|
20
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBase_DESTROY) { xs::throw_guard(cv, [=]() |
|
389
|
|
|
|
|
|
|
{ |
|
390
|
10
|
|
|
|
|
|
dVAR; dXSARGS; |
|
391
|
10
|
50
|
|
|
|
|
if (items != 1) |
|
392
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
393
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
394
|
10
|
|
|
|
|
|
SP -= items; |
|
395
|
|
|
|
|
|
|
{ |
|
396
|
10
|
50
|
|
|
|
|
MyBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
; |
|
398
|
|
|
|
|
|
|
#line 70 "t/typemap/object/single.xsi" |
|
399
|
|
|
|
|
|
|
dcnt.perl++; |
|
400
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
401
|
|
|
|
|
|
|
#line 402 "t/typemap/object/object_xsgen.cc" |
|
402
|
10
|
|
|
|
|
|
PUTBACK; |
|
403
|
10
|
|
|
|
|
|
return; |
|
404
|
|
|
|
|
|
|
} |
|
405
|
10
|
50
|
|
|
|
|
}); } |
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'single.xsi' */ |
|
409
|
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
/* INCLUDE: Including 'child.xsi' from 'object.xs' */ |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
template |
|
414
|
|
|
|
|
|
|
class _MyChild : public _MyBase { |
|
415
|
|
|
|
|
|
|
public: |
|
416
|
|
|
|
|
|
|
int val2; |
|
417
|
20
|
|
|
|
|
|
_MyChild (int arg1, int arg2) : _MyBase(arg1), val2(arg2) {} |
|
418
|
0
|
|
|
|
|
|
_MyBase* clone () const { return new _MyChild(this->val, val2); } |
|
419
|
40
|
50
|
|
|
|
|
virtual ~_MyChild () { dcnt.c++; } |
|
|
|
50
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
}; |
|
421
|
|
|
|
|
|
|
using MyChild = _MyChild<0>; |
|
422
|
|
|
|
|
|
|
using PTRMyChild = _MyChild<1>; |
|
423
|
|
|
|
|
|
|
namespace xs { |
|
424
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
425
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyChild"; } |
|
426
|
|
|
|
|
|
|
}; |
|
427
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
428
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyChild"; } |
|
429
|
|
|
|
|
|
|
}; |
|
430
|
|
|
|
|
|
|
} |
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|
|
433
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChild_new) { xs::throw_guard(cv, [=]() |
|
434
|
|
|
|
|
|
|
{ |
|
435
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
436
|
2
|
50
|
|
|
|
|
if (items != 3) |
|
437
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg1, arg2"); |
|
438
|
|
|
|
|
|
|
{ |
|
439
|
|
|
|
|
|
|
PTRMyChild * RETVAL; |
|
440
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
441
|
|
|
|
|
|
|
; |
|
442
|
2
|
50
|
|
|
|
|
int arg1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
; |
|
444
|
2
|
50
|
|
|
|
|
int arg2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
; |
|
446
|
|
|
|
|
|
|
#line 32 "t/typemap/object/child.xsi" |
|
447
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
448
|
|
|
|
|
|
|
PROTO = CLASS; |
|
449
|
|
|
|
|
|
|
RETVAL = new PTRMyChild(arg1, arg2); |
|
450
|
|
|
|
|
|
|
#line 451 "t/typemap/object/object_xsgen.cc" |
|
451
|
|
|
|
|
|
|
{ |
|
452
|
|
|
|
|
|
|
SV * RETVALSV; |
|
453
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
454
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
455
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
456
|
|
|
|
|
|
|
} |
|
457
|
|
|
|
|
|
|
} |
|
458
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
459
|
2
|
50
|
|
|
|
|
}); } |
|
460
|
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
|
|
463
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChild_val2) { xs::throw_guard(cv, [=]() |
|
464
|
|
|
|
|
|
|
{ |
|
465
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
466
|
3
|
100
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
467
|
1
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
468
|
|
|
|
|
|
|
{ |
|
469
|
|
|
|
|
|
|
int RETVAL; |
|
470
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
471
|
2
|
50
|
|
|
|
|
PTRMyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
; |
|
473
|
|
|
|
|
|
|
SV* newval; |
|
474
|
|
|
|
|
|
|
|
|
475
|
2
|
50
|
|
|
|
|
if (items < 2) |
|
476
|
2
|
|
|
|
|
|
newval = NULL; |
|
477
|
|
|
|
|
|
|
else { |
|
478
|
0
|
|
|
|
|
|
newval = ST(1) |
|
479
|
0
|
|
|
|
|
|
; |
|
480
|
|
|
|
|
|
|
} |
|
481
|
|
|
|
|
|
|
#line 35 "t/typemap/object/child.xsi" |
|
482
|
|
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
483
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
484
|
|
|
|
|
|
|
#line 485 "t/typemap/object/object_xsgen.cc" |
|
485
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
} |
|
487
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
488
|
3
|
50
|
|
|
|
|
}); } |
|
489
|
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
|
|
492
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChild_set_from) { xs::throw_guard(cv, [=]() |
|
493
|
|
|
|
|
|
|
{ |
|
494
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
495
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
496
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
497
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
498
|
2
|
|
|
|
|
|
SP -= items; |
|
499
|
|
|
|
|
|
|
{ |
|
500
|
2
|
50
|
|
|
|
|
PTRMyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
; |
|
502
|
2
|
|
|
|
|
|
PTRMyChild* other = xs::in(ST(1)); |
|
503
|
|
|
|
|
|
|
; |
|
504
|
|
|
|
|
|
|
#line 40 "t/typemap/object/child.xsi" |
|
505
|
|
|
|
|
|
|
if (other) { |
|
506
|
|
|
|
|
|
|
THIS->val = other->val; |
|
507
|
|
|
|
|
|
|
THIS->val2 = other->val2; |
|
508
|
|
|
|
|
|
|
} |
|
509
|
|
|
|
|
|
|
#line 510 "t/typemap/object/object_xsgen.cc" |
|
510
|
1
|
|
|
|
|
|
PUTBACK; |
|
511
|
1
|
|
|
|
|
|
return; |
|
512
|
|
|
|
|
|
|
} |
|
513
|
2
|
50
|
|
|
|
|
}); } |
|
514
|
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
|
|
517
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChild_DESTROY) { xs::throw_guard(cv, [=]() |
|
518
|
|
|
|
|
|
|
{ |
|
519
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
520
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
521
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
522
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
523
|
2
|
|
|
|
|
|
SP -= items; |
|
524
|
|
|
|
|
|
|
{ |
|
525
|
2
|
50
|
|
|
|
|
PTRMyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
; |
|
527
|
|
|
|
|
|
|
#line 47 "t/typemap/object/child.xsi" |
|
528
|
|
|
|
|
|
|
dcnt.perl++; |
|
529
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
530
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
531
|
|
|
|
|
|
|
#line 532 "t/typemap/object/object_xsgen.cc" |
|
532
|
2
|
|
|
|
|
|
PUTBACK; |
|
533
|
2
|
|
|
|
|
|
return; |
|
534
|
|
|
|
|
|
|
} |
|
535
|
2
|
50
|
|
|
|
|
}); } |
|
536
|
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
|
|
539
|
14
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChild_new) { xs::throw_guard(cv, [=]() |
|
540
|
|
|
|
|
|
|
{ |
|
541
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
542
|
7
|
50
|
|
|
|
|
if (items != 3) |
|
543
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg1, arg2"); |
|
544
|
|
|
|
|
|
|
{ |
|
545
|
|
|
|
|
|
|
MyChild * RETVAL; |
|
546
|
7
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
547
|
|
|
|
|
|
|
; |
|
548
|
7
|
50
|
|
|
|
|
int arg1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
; |
|
550
|
7
|
50
|
|
|
|
|
int arg2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
; |
|
552
|
|
|
|
|
|
|
#line 59 "t/typemap/object/child.xsi" |
|
553
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
554
|
|
|
|
|
|
|
PROTO = CLASS; |
|
555
|
|
|
|
|
|
|
if (!arg1 && !arg2) XSRETURN_UNDEF; |
|
556
|
|
|
|
|
|
|
RETVAL = new MyChild(arg1, arg2); |
|
557
|
|
|
|
|
|
|
#line 558 "t/typemap/object/object_xsgen.cc" |
|
558
|
|
|
|
|
|
|
{ |
|
559
|
|
|
|
|
|
|
SV * RETVALSV; |
|
560
|
6
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
561
|
6
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
562
|
7
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
563
|
|
|
|
|
|
|
} |
|
564
|
|
|
|
|
|
|
} |
|
565
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
566
|
7
|
50
|
|
|
|
|
}); } |
|
567
|
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
|
|
570
|
14
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChild_val2) { xs::throw_guard(cv, [=]() |
|
571
|
|
|
|
|
|
|
{ |
|
572
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
573
|
7
|
100
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
574
|
1
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
575
|
|
|
|
|
|
|
{ |
|
576
|
|
|
|
|
|
|
int RETVAL; |
|
577
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
578
|
6
|
50
|
|
|
|
|
MyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
; |
|
580
|
|
|
|
|
|
|
SV* newval; |
|
581
|
|
|
|
|
|
|
|
|
582
|
6
|
50
|
|
|
|
|
if (items < 2) |
|
583
|
6
|
|
|
|
|
|
newval = NULL; |
|
584
|
|
|
|
|
|
|
else { |
|
585
|
0
|
|
|
|
|
|
newval = ST(1) |
|
586
|
0
|
|
|
|
|
|
; |
|
587
|
|
|
|
|
|
|
} |
|
588
|
|
|
|
|
|
|
#line 64 "t/typemap/object/child.xsi" |
|
589
|
|
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
590
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
591
|
|
|
|
|
|
|
#line 592 "t/typemap/object/object_xsgen.cc" |
|
592
|
6
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
} |
|
594
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
595
|
7
|
50
|
|
|
|
|
}); } |
|
596
|
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
|
|
599
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChild_set_from) { xs::throw_guard(cv, [=]() |
|
600
|
|
|
|
|
|
|
{ |
|
601
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
602
|
4
|
50
|
|
|
|
|
if (items != 2) |
|
603
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
604
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
605
|
4
|
|
|
|
|
|
SP -= items; |
|
606
|
|
|
|
|
|
|
{ |
|
607
|
4
|
50
|
|
|
|
|
MyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
; |
|
609
|
4
|
|
|
|
|
|
MyChild* other = xs::in(ST(1)); |
|
610
|
|
|
|
|
|
|
; |
|
611
|
|
|
|
|
|
|
#line 69 "t/typemap/object/child.xsi" |
|
612
|
|
|
|
|
|
|
if (other) { |
|
613
|
|
|
|
|
|
|
THIS->val = other->val; |
|
614
|
|
|
|
|
|
|
THIS->val2 = other->val2; |
|
615
|
|
|
|
|
|
|
} |
|
616
|
|
|
|
|
|
|
#line 617 "t/typemap/object/object_xsgen.cc" |
|
617
|
3
|
|
|
|
|
|
PUTBACK; |
|
618
|
3
|
|
|
|
|
|
return; |
|
619
|
|
|
|
|
|
|
} |
|
620
|
4
|
50
|
|
|
|
|
}); } |
|
621
|
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
|
|
624
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChild_DESTROY) { xs::throw_guard(cv, [=]() |
|
625
|
|
|
|
|
|
|
{ |
|
626
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
627
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
628
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
629
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
630
|
6
|
|
|
|
|
|
SP -= items; |
|
631
|
|
|
|
|
|
|
{ |
|
632
|
6
|
50
|
|
|
|
|
MyChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
; |
|
634
|
|
|
|
|
|
|
#line 76 "t/typemap/object/child.xsi" |
|
635
|
|
|
|
|
|
|
dcnt.perl++; |
|
636
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
637
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
638
|
|
|
|
|
|
|
#line 639 "t/typemap/object/object_xsgen.cc" |
|
639
|
6
|
|
|
|
|
|
PUTBACK; |
|
640
|
6
|
|
|
|
|
|
return; |
|
641
|
|
|
|
|
|
|
} |
|
642
|
6
|
50
|
|
|
|
|
}); } |
|
643
|
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'child.xsi' */ |
|
646
|
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
/* INCLUDE: Including 'refcnt.xsi' from 'object.xs' */ |
|
649
|
|
|
|
|
|
|
|
|
650
|
|
|
|
|
|
|
template |
|
651
|
|
|
|
|
|
|
class _MyRefCounted : public panda::Refcnt { |
|
652
|
|
|
|
|
|
|
public: |
|
653
|
|
|
|
|
|
|
int val; |
|
654
|
24
|
|
|
|
|
|
_MyRefCounted (int val) : val(val) { } |
|
655
|
20
|
|
|
|
|
|
virtual ~_MyRefCounted () { |
|
656
|
12
|
|
|
|
|
|
dcnt.c++; |
|
657
|
20
|
50
|
|
|
|
|
} |
|
|
|
50
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
}; |
|
659
|
|
|
|
|
|
|
template |
|
660
|
|
|
|
|
|
|
class _MyRefCountedChild : public _MyRefCounted { |
|
661
|
|
|
|
|
|
|
public: |
|
662
|
|
|
|
|
|
|
int val2; |
|
663
|
8
|
|
|
|
|
|
_MyRefCountedChild (int val, int val2) : _MyRefCounted(val), val2(val2) { } |
|
664
|
8
|
|
|
|
|
|
virtual ~_MyRefCountedChild () { |
|
665
|
4
|
|
|
|
|
|
dcnt.c++; |
|
666
|
8
|
50
|
|
|
|
|
} |
|
|
|
50
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
}; |
|
668
|
|
|
|
|
|
|
using MyRefCounted = _MyRefCounted<0>; |
|
669
|
|
|
|
|
|
|
using MyRefCountedChild = _MyRefCountedChild<0>; |
|
670
|
|
|
|
|
|
|
using MyRefCountedIPTR = panda::iptr; |
|
671
|
|
|
|
|
|
|
using MyRefCountedChildIPTR = panda::iptr; |
|
672
|
|
|
|
|
|
|
using PTRMyRefCounted = _MyRefCounted<1>; |
|
673
|
|
|
|
|
|
|
using PTRMyRefCountedChild = _MyRefCountedChild<1>; |
|
674
|
|
|
|
|
|
|
using PTRMyRefCountedIPTR = panda::iptr; |
|
675
|
|
|
|
|
|
|
using PTRMyRefCountedChildIPTR = panda::iptr; |
|
676
|
|
|
|
|
|
|
static MyRefCounted* st_myrefcounted; |
|
677
|
|
|
|
|
|
|
static PTRMyRefCounted* st_ptr_myrefcounted; |
|
678
|
34
|
|
|
|
|
|
static MyRefCountedIPTR st_myrefcounted_iptr; |
|
679
|
34
|
|
|
|
|
|
static PTRMyRefCountedIPTR st_ptr_myrefcounted_iptr; |
|
680
|
|
|
|
|
|
|
using MyBaseSP = std::shared_ptr; |
|
681
|
|
|
|
|
|
|
using MyChildSP = std::shared_ptr; |
|
682
|
|
|
|
|
|
|
using PTRMyBaseSP = std::shared_ptr; |
|
683
|
|
|
|
|
|
|
using PTRMyChildSP = std::shared_ptr; |
|
684
|
34
|
|
|
|
|
|
static MyBaseSP st_mybase_sp; |
|
685
|
34
|
|
|
|
|
|
static PTRMyBaseSP st_ptr_mybase_sp; |
|
686
|
|
|
|
|
|
|
namespace xs { |
|
687
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
688
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyRefCounted"; } |
|
689
|
|
|
|
|
|
|
}; |
|
690
|
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
692
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyRefCountedChild"; } |
|
693
|
|
|
|
|
|
|
}; |
|
694
|
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
696
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyRefCounted"; } |
|
697
|
|
|
|
|
|
|
}; |
|
698
|
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
700
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MyRefCountedChild"; } |
|
701
|
|
|
|
|
|
|
}; |
|
702
|
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
704
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyBaseSP"; } |
|
705
|
|
|
|
|
|
|
}; |
|
706
|
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
708
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyChildSP"; } |
|
709
|
|
|
|
|
|
|
}; |
|
710
|
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
712
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyBaseSP"; } |
|
713
|
|
|
|
|
|
|
static MyBaseSP dup (const MyBaseSP& obj) { return MyBaseSP(obj->clone()); } |
|
714
|
|
|
|
|
|
|
}; |
|
715
|
|
|
|
|
|
|
|
|
716
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
717
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MyChildSP"; } |
|
718
|
|
|
|
|
|
|
}; |
|
719
|
|
|
|
|
|
|
} |
|
720
|
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
|
|
722
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hold_ptr_myrefcounted) { xs::throw_guard(cv, [=]() |
|
723
|
|
|
|
|
|
|
{ |
|
724
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
725
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
726
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
727
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
728
|
1
|
|
|
|
|
|
SP -= items; |
|
729
|
|
|
|
|
|
|
{ |
|
730
|
1
|
|
|
|
|
|
PTRMyRefCounted* obj = xs::in(ST(0)); |
|
731
|
|
|
|
|
|
|
; |
|
732
|
|
|
|
|
|
|
#line 85 "t/typemap/object/refcnt.xsi" |
|
733
|
|
|
|
|
|
|
obj->retain(); |
|
734
|
|
|
|
|
|
|
st_ptr_myrefcounted = obj; |
|
735
|
|
|
|
|
|
|
#line 736 "t/typemap/object/object_xsgen.cc" |
|
736
|
1
|
|
|
|
|
|
PUTBACK; |
|
737
|
1
|
|
|
|
|
|
return; |
|
738
|
|
|
|
|
|
|
} |
|
739
|
1
|
50
|
|
|
|
|
}); } |
|
740
|
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
|
|
743
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_ptr_myrefcounted) { xs::throw_guard(cv, [=]() |
|
744
|
|
|
|
|
|
|
{ |
|
745
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
746
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
747
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
748
|
|
|
|
|
|
|
{ |
|
749
|
|
|
|
|
|
|
PTRMyRefCounted * RETVAL; |
|
750
|
|
|
|
|
|
|
#line 90 "t/typemap/object/refcnt.xsi" |
|
751
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
752
|
|
|
|
|
|
|
PTRMyRefCountedIPTR autorel(st_ptr_myrefcounted); |
|
753
|
|
|
|
|
|
|
st_ptr_myrefcounted->release(); |
|
754
|
|
|
|
|
|
|
RETVAL = st_ptr_myrefcounted; |
|
755
|
|
|
|
|
|
|
#line 756 "t/typemap/object/object_xsgen.cc" |
|
756
|
|
|
|
|
|
|
{ |
|
757
|
|
|
|
|
|
|
SV * RETVALSV; |
|
758
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
759
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
760
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
761
|
|
|
|
|
|
|
} |
|
762
|
|
|
|
|
|
|
} |
|
763
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
764
|
1
|
50
|
|
|
|
|
}); } |
|
765
|
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
|
|
768
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hold_myrefcounted) { xs::throw_guard(cv, [=]() |
|
769
|
|
|
|
|
|
|
{ |
|
770
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
771
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
772
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
773
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
774
|
1
|
|
|
|
|
|
SP -= items; |
|
775
|
|
|
|
|
|
|
{ |
|
776
|
1
|
|
|
|
|
|
MyRefCounted* obj = xs::in(ST(0)); |
|
777
|
|
|
|
|
|
|
; |
|
778
|
|
|
|
|
|
|
#line 96 "t/typemap/object/refcnt.xsi" |
|
779
|
|
|
|
|
|
|
obj->retain(); |
|
780
|
|
|
|
|
|
|
st_myrefcounted = obj; |
|
781
|
|
|
|
|
|
|
#line 782 "t/typemap/object/object_xsgen.cc" |
|
782
|
1
|
|
|
|
|
|
PUTBACK; |
|
783
|
1
|
|
|
|
|
|
return; |
|
784
|
|
|
|
|
|
|
} |
|
785
|
1
|
50
|
|
|
|
|
}); } |
|
786
|
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
|
|
789
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_myrefcounted) { xs::throw_guard(cv, [=]() |
|
790
|
|
|
|
|
|
|
{ |
|
791
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
792
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
793
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
794
|
|
|
|
|
|
|
{ |
|
795
|
|
|
|
|
|
|
MyRefCounted * RETVAL; |
|
796
|
|
|
|
|
|
|
#line 101 "t/typemap/object/refcnt.xsi" |
|
797
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
798
|
|
|
|
|
|
|
MyRefCountedIPTR autorel(st_myrefcounted); |
|
799
|
|
|
|
|
|
|
st_myrefcounted->release(); |
|
800
|
|
|
|
|
|
|
RETVAL = st_myrefcounted; |
|
801
|
|
|
|
|
|
|
#line 802 "t/typemap/object/object_xsgen.cc" |
|
802
|
|
|
|
|
|
|
{ |
|
803
|
|
|
|
|
|
|
SV * RETVALSV; |
|
804
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
805
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
806
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
807
|
|
|
|
|
|
|
} |
|
808
|
|
|
|
|
|
|
} |
|
809
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
810
|
1
|
50
|
|
|
|
|
}); } |
|
811
|
|
|
|
|
|
|
|
|
812
|
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
|
|
814
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hold_ptr_myrefcounted_iptr) { xs::throw_guard(cv, [=]() |
|
815
|
|
|
|
|
|
|
{ |
|
816
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
817
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
818
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
819
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
820
|
1
|
|
|
|
|
|
SP -= items; |
|
821
|
|
|
|
|
|
|
{ |
|
822
|
2
|
50
|
|
|
|
|
PTRMyRefCountedIPTR obj = xs::in(ST(0)); |
|
823
|
|
|
|
|
|
|
; |
|
824
|
|
|
|
|
|
|
#line 107 "t/typemap/object/refcnt.xsi" |
|
825
|
|
|
|
|
|
|
st_ptr_myrefcounted_iptr = obj; |
|
826
|
|
|
|
|
|
|
#line 827 "t/typemap/object/object_xsgen.cc" |
|
827
|
1
|
|
|
|
|
|
PUTBACK; |
|
828
|
2
|
|
|
|
|
|
return; |
|
829
|
|
|
|
|
|
|
} |
|
830
|
1
|
50
|
|
|
|
|
}); } |
|
831
|
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
|
|
834
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_ptr_myrefcounted_iptr) { xs::throw_guard(cv, [=]() |
|
835
|
|
|
|
|
|
|
{ |
|
836
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
837
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
838
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
839
|
|
|
|
|
|
|
{ |
|
840
|
2
|
|
|
|
|
|
PTRMyRefCountedIPTR RETVAL; |
|
841
|
|
|
|
|
|
|
#line 111 "t/typemap/object/refcnt.xsi" |
|
842
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
843
|
|
|
|
|
|
|
RETVAL = st_ptr_myrefcounted_iptr; |
|
844
|
|
|
|
|
|
|
st_ptr_myrefcounted_iptr.reset(); |
|
845
|
|
|
|
|
|
|
#line 846 "t/typemap/object/object_xsgen.cc" |
|
846
|
|
|
|
|
|
|
{ |
|
847
|
|
|
|
|
|
|
SV * RETVALSV; |
|
848
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
849
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
850
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
851
|
|
|
|
|
|
|
} |
|
852
|
|
|
|
|
|
|
} |
|
853
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
854
|
1
|
50
|
|
|
|
|
}); } |
|
855
|
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
|
|
858
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hold_myrefcounted_iptr) { xs::throw_guard(cv, [=]() |
|
859
|
|
|
|
|
|
|
{ |
|
860
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
861
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
862
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
863
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
864
|
1
|
|
|
|
|
|
SP -= items; |
|
865
|
|
|
|
|
|
|
{ |
|
866
|
2
|
50
|
|
|
|
|
MyRefCountedIPTR obj = xs::in(ST(0)); |
|
867
|
|
|
|
|
|
|
; |
|
868
|
|
|
|
|
|
|
#line 116 "t/typemap/object/refcnt.xsi" |
|
869
|
|
|
|
|
|
|
st_myrefcounted_iptr = obj; |
|
870
|
|
|
|
|
|
|
#line 871 "t/typemap/object/object_xsgen.cc" |
|
871
|
1
|
|
|
|
|
|
PUTBACK; |
|
872
|
2
|
|
|
|
|
|
return; |
|
873
|
|
|
|
|
|
|
} |
|
874
|
1
|
50
|
|
|
|
|
}); } |
|
875
|
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
|
|
878
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_myrefcounted_iptr) { xs::throw_guard(cv, [=]() |
|
879
|
|
|
|
|
|
|
{ |
|
880
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
881
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
882
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
883
|
|
|
|
|
|
|
{ |
|
884
|
2
|
|
|
|
|
|
MyRefCountedIPTR RETVAL; |
|
885
|
|
|
|
|
|
|
#line 120 "t/typemap/object/refcnt.xsi" |
|
886
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
887
|
|
|
|
|
|
|
RETVAL = st_myrefcounted_iptr; |
|
888
|
|
|
|
|
|
|
st_myrefcounted_iptr.reset(); |
|
889
|
|
|
|
|
|
|
#line 890 "t/typemap/object/object_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_MyTest_hold_ptr_mybase_sp) { xs::throw_guard(cv, [=]() |
|
903
|
|
|
|
|
|
|
{ |
|
904
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
905
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
906
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
907
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
908
|
1
|
|
|
|
|
|
SP -= items; |
|
909
|
|
|
|
|
|
|
{ |
|
910
|
2
|
50
|
|
|
|
|
PTRMyBaseSP obj = xs::in(ST(0)); |
|
911
|
|
|
|
|
|
|
; |
|
912
|
|
|
|
|
|
|
#line 125 "t/typemap/object/refcnt.xsi" |
|
913
|
|
|
|
|
|
|
st_ptr_mybase_sp = obj; |
|
914
|
|
|
|
|
|
|
#line 915 "t/typemap/object/object_xsgen.cc" |
|
915
|
1
|
|
|
|
|
|
PUTBACK; |
|
916
|
2
|
|
|
|
|
|
return; |
|
917
|
|
|
|
|
|
|
} |
|
918
|
1
|
50
|
|
|
|
|
}); } |
|
919
|
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
|
|
922
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_ptr_mybase_sp) { xs::throw_guard(cv, [=]() |
|
923
|
|
|
|
|
|
|
{ |
|
924
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
925
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
926
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
927
|
|
|
|
|
|
|
{ |
|
928
|
1
|
|
|
|
|
|
PTRMyBaseSP RETVAL; |
|
929
|
|
|
|
|
|
|
#line 129 "t/typemap/object/refcnt.xsi" |
|
930
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
931
|
|
|
|
|
|
|
RETVAL = st_ptr_mybase_sp; |
|
932
|
|
|
|
|
|
|
st_ptr_mybase_sp.reset(); |
|
933
|
|
|
|
|
|
|
#line 934 "t/typemap/object/object_xsgen.cc" |
|
934
|
|
|
|
|
|
|
{ |
|
935
|
|
|
|
|
|
|
SV * RETVALSV; |
|
936
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
937
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
938
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
939
|
|
|
|
|
|
|
} |
|
940
|
|
|
|
|
|
|
} |
|
941
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
942
|
1
|
50
|
|
|
|
|
}); } |
|
943
|
|
|
|
|
|
|
|
|
944
|
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
|
|
946
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_hold_mybase_sp) { xs::throw_guard(cv, [=]() |
|
947
|
|
|
|
|
|
|
{ |
|
948
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
949
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
950
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
951
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
952
|
1
|
|
|
|
|
|
SP -= items; |
|
953
|
|
|
|
|
|
|
{ |
|
954
|
2
|
50
|
|
|
|
|
MyBaseSP obj = xs::in(ST(0)); |
|
955
|
|
|
|
|
|
|
; |
|
956
|
|
|
|
|
|
|
#line 134 "t/typemap/object/refcnt.xsi" |
|
957
|
|
|
|
|
|
|
st_mybase_sp = obj; |
|
958
|
|
|
|
|
|
|
#line 959 "t/typemap/object/object_xsgen.cc" |
|
959
|
1
|
|
|
|
|
|
PUTBACK; |
|
960
|
2
|
|
|
|
|
|
return; |
|
961
|
|
|
|
|
|
|
} |
|
962
|
1
|
50
|
|
|
|
|
}); } |
|
963
|
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
|
|
965
|
|
|
|
|
|
|
|
|
966
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest_release_mybase_sp) { xs::throw_guard(cv, [=]() |
|
967
|
|
|
|
|
|
|
{ |
|
968
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
969
|
1
|
50
|
|
|
|
|
if (items != 0) |
|
970
|
0
|
|
|
|
|
|
croak_xs_usage(cv, ""); |
|
971
|
|
|
|
|
|
|
{ |
|
972
|
1
|
|
|
|
|
|
MyBaseSP RETVAL; |
|
973
|
|
|
|
|
|
|
#line 138 "t/typemap/object/refcnt.xsi" |
|
974
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
975
|
|
|
|
|
|
|
RETVAL = st_mybase_sp; |
|
976
|
|
|
|
|
|
|
st_mybase_sp.reset(); |
|
977
|
|
|
|
|
|
|
#line 978 "t/typemap/object/object_xsgen.cc" |
|
978
|
|
|
|
|
|
|
{ |
|
979
|
|
|
|
|
|
|
SV * RETVALSV; |
|
980
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
981
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
982
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
983
|
|
|
|
|
|
|
} |
|
984
|
|
|
|
|
|
|
} |
|
985
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
986
|
1
|
50
|
|
|
|
|
}); } |
|
987
|
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
|
|
989
|
|
|
|
|
|
|
|
|
990
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCounted_new) { xs::throw_guard(cv, [=]() |
|
991
|
|
|
|
|
|
|
{ |
|
992
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
993
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
994
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
995
|
|
|
|
|
|
|
{ |
|
996
|
|
|
|
|
|
|
PTRMyRefCounted * RETVAL; |
|
997
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
998
|
|
|
|
|
|
|
; |
|
999
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
; |
|
1001
|
|
|
|
|
|
|
#line 147 "t/typemap/object/refcnt.xsi" |
|
1002
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1003
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1004
|
|
|
|
|
|
|
RETVAL = new PTRMyRefCounted(val); |
|
1005
|
|
|
|
|
|
|
#line 1006 "t/typemap/object/object_xsgen.cc" |
|
1006
|
|
|
|
|
|
|
{ |
|
1007
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1008
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1009
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1010
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1011
|
|
|
|
|
|
|
} |
|
1012
|
|
|
|
|
|
|
} |
|
1013
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1014
|
2
|
50
|
|
|
|
|
}); } |
|
1015
|
|
|
|
|
|
|
|
|
1016
|
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
|
|
1018
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCounted_val) { xs::throw_guard(cv, [=]() |
|
1019
|
|
|
|
|
|
|
{ |
|
1020
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1021
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
1022
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1023
|
|
|
|
|
|
|
{ |
|
1024
|
|
|
|
|
|
|
int RETVAL; |
|
1025
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1026
|
6
|
50
|
|
|
|
|
PTRMyRefCounted* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1027
|
|
|
|
|
|
|
; |
|
1028
|
|
|
|
|
|
|
#line 150 "t/typemap/object/refcnt.xsi" |
|
1029
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1030
|
|
|
|
|
|
|
#line 1031 "t/typemap/object/object_xsgen.cc" |
|
1031
|
5
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1032
|
|
|
|
|
|
|
} |
|
1033
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
1034
|
6
|
50
|
|
|
|
|
}); } |
|
1035
|
|
|
|
|
|
|
|
|
1036
|
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
|
|
1038
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCounted_DESTROY) { xs::throw_guard(cv, [=]() |
|
1039
|
|
|
|
|
|
|
{ |
|
1040
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1041
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
1042
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1043
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1044
|
5
|
|
|
|
|
|
SP -= items; |
|
1045
|
|
|
|
|
|
|
{ |
|
1046
|
5
|
50
|
|
|
|
|
PTRMyRefCounted* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
; |
|
1048
|
|
|
|
|
|
|
#line 153 "t/typemap/object/refcnt.xsi" |
|
1049
|
|
|
|
|
|
|
dcnt.perl++; |
|
1050
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1051
|
|
|
|
|
|
|
#line 1052 "t/typemap/object/object_xsgen.cc" |
|
1052
|
5
|
|
|
|
|
|
PUTBACK; |
|
1053
|
5
|
|
|
|
|
|
return; |
|
1054
|
|
|
|
|
|
|
} |
|
1055
|
5
|
50
|
|
|
|
|
}); } |
|
1056
|
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
|
|
1058
|
|
|
|
|
|
|
|
|
1059
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChild_new) { xs::throw_guard(cv, [=]() |
|
1060
|
|
|
|
|
|
|
{ |
|
1061
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1062
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1063
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val, val2"); |
|
1064
|
|
|
|
|
|
|
{ |
|
1065
|
|
|
|
|
|
|
PTRMyRefCountedChild * RETVAL; |
|
1066
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1067
|
|
|
|
|
|
|
; |
|
1068
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
; |
|
1070
|
1
|
50
|
|
|
|
|
int val2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1071
|
|
|
|
|
|
|
; |
|
1072
|
|
|
|
|
|
|
#line 164 "t/typemap/object/refcnt.xsi" |
|
1073
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1074
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1075
|
|
|
|
|
|
|
RETVAL = new PTRMyRefCountedChild(val, val2); |
|
1076
|
|
|
|
|
|
|
#line 1077 "t/typemap/object/object_xsgen.cc" |
|
1077
|
|
|
|
|
|
|
{ |
|
1078
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1079
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1080
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1081
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1082
|
|
|
|
|
|
|
} |
|
1083
|
|
|
|
|
|
|
} |
|
1084
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1085
|
1
|
50
|
|
|
|
|
}); } |
|
1086
|
|
|
|
|
|
|
|
|
1087
|
|
|
|
|
|
|
|
|
1088
|
|
|
|
|
|
|
|
|
1089
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChild_val2) { xs::throw_guard(cv, [=]() |
|
1090
|
|
|
|
|
|
|
{ |
|
1091
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1092
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1093
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1094
|
|
|
|
|
|
|
{ |
|
1095
|
|
|
|
|
|
|
int RETVAL; |
|
1096
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1097
|
1
|
50
|
|
|
|
|
PTRMyRefCountedChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1098
|
|
|
|
|
|
|
; |
|
1099
|
|
|
|
|
|
|
#line 167 "t/typemap/object/refcnt.xsi" |
|
1100
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1101
|
|
|
|
|
|
|
#line 1102 "t/typemap/object/object_xsgen.cc" |
|
1102
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1103
|
|
|
|
|
|
|
} |
|
1104
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1105
|
1
|
50
|
|
|
|
|
}); } |
|
1106
|
|
|
|
|
|
|
|
|
1107
|
|
|
|
|
|
|
|
|
1108
|
|
|
|
|
|
|
|
|
1109
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChild_DESTROY) { xs::throw_guard(cv, [=]() |
|
1110
|
|
|
|
|
|
|
{ |
|
1111
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1112
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1113
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1114
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1115
|
1
|
|
|
|
|
|
SP -= items; |
|
1116
|
|
|
|
|
|
|
{ |
|
1117
|
1
|
50
|
|
|
|
|
PTRMyRefCountedChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
; |
|
1119
|
|
|
|
|
|
|
#line 171 "t/typemap/object/refcnt.xsi" |
|
1120
|
|
|
|
|
|
|
dcnt.perl++; |
|
1121
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1122
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1123
|
|
|
|
|
|
|
#line 1124 "t/typemap/object/object_xsgen.cc" |
|
1124
|
1
|
|
|
|
|
|
PUTBACK; |
|
1125
|
1
|
|
|
|
|
|
return; |
|
1126
|
|
|
|
|
|
|
} |
|
1127
|
1
|
50
|
|
|
|
|
}); } |
|
1128
|
|
|
|
|
|
|
|
|
1129
|
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
|
|
1131
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCounted_new) { xs::throw_guard(cv, [=]() |
|
1132
|
|
|
|
|
|
|
{ |
|
1133
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1134
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1135
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
1136
|
|
|
|
|
|
|
{ |
|
1137
|
|
|
|
|
|
|
MyRefCounted * RETVAL; |
|
1138
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1139
|
|
|
|
|
|
|
; |
|
1140
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1141
|
|
|
|
|
|
|
; |
|
1142
|
|
|
|
|
|
|
#line 180 "t/typemap/object/refcnt.xsi" |
|
1143
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1144
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1145
|
|
|
|
|
|
|
RETVAL = new MyRefCounted(val); |
|
1146
|
|
|
|
|
|
|
#line 1147 "t/typemap/object/object_xsgen.cc" |
|
1147
|
|
|
|
|
|
|
{ |
|
1148
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1149
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1150
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1151
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1152
|
|
|
|
|
|
|
} |
|
1153
|
|
|
|
|
|
|
} |
|
1154
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1155
|
2
|
50
|
|
|
|
|
}); } |
|
1156
|
|
|
|
|
|
|
|
|
1157
|
|
|
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
|
|
1159
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCounted_val) { xs::throw_guard(cv, [=]() |
|
1160
|
|
|
|
|
|
|
{ |
|
1161
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1162
|
6
|
50
|
|
|
|
|
if (items != 1) |
|
1163
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1164
|
|
|
|
|
|
|
{ |
|
1165
|
|
|
|
|
|
|
int RETVAL; |
|
1166
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1167
|
6
|
50
|
|
|
|
|
MyRefCounted* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
; |
|
1169
|
|
|
|
|
|
|
#line 183 "t/typemap/object/refcnt.xsi" |
|
1170
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1171
|
|
|
|
|
|
|
#line 1172 "t/typemap/object/object_xsgen.cc" |
|
1172
|
5
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1173
|
|
|
|
|
|
|
} |
|
1174
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
1175
|
6
|
50
|
|
|
|
|
}); } |
|
1176
|
|
|
|
|
|
|
|
|
1177
|
|
|
|
|
|
|
|
|
1178
|
|
|
|
|
|
|
|
|
1179
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCounted_DESTROY) { xs::throw_guard(cv, [=]() |
|
1180
|
|
|
|
|
|
|
{ |
|
1181
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1182
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
1183
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1184
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1185
|
5
|
|
|
|
|
|
SP -= items; |
|
1186
|
|
|
|
|
|
|
{ |
|
1187
|
5
|
50
|
|
|
|
|
MyRefCounted* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1188
|
|
|
|
|
|
|
; |
|
1189
|
|
|
|
|
|
|
#line 186 "t/typemap/object/refcnt.xsi" |
|
1190
|
|
|
|
|
|
|
dcnt.perl++; |
|
1191
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1192
|
|
|
|
|
|
|
#line 1193 "t/typemap/object/object_xsgen.cc" |
|
1193
|
5
|
|
|
|
|
|
PUTBACK; |
|
1194
|
5
|
|
|
|
|
|
return; |
|
1195
|
|
|
|
|
|
|
} |
|
1196
|
5
|
50
|
|
|
|
|
}); } |
|
1197
|
|
|
|
|
|
|
|
|
1198
|
|
|
|
|
|
|
|
|
1199
|
|
|
|
|
|
|
|
|
1200
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChild_new) { xs::throw_guard(cv, [=]() |
|
1201
|
|
|
|
|
|
|
{ |
|
1202
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1203
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1204
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val, val2"); |
|
1205
|
|
|
|
|
|
|
{ |
|
1206
|
|
|
|
|
|
|
MyRefCountedChild * RETVAL; |
|
1207
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1208
|
|
|
|
|
|
|
; |
|
1209
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1210
|
|
|
|
|
|
|
; |
|
1211
|
1
|
50
|
|
|
|
|
int val2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1212
|
|
|
|
|
|
|
; |
|
1213
|
|
|
|
|
|
|
#line 197 "t/typemap/object/refcnt.xsi" |
|
1214
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1215
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1216
|
|
|
|
|
|
|
RETVAL = new MyRefCountedChild(val, val2); |
|
1217
|
|
|
|
|
|
|
#line 1218 "t/typemap/object/object_xsgen.cc" |
|
1218
|
|
|
|
|
|
|
{ |
|
1219
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1220
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1221
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1222
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1223
|
|
|
|
|
|
|
} |
|
1224
|
|
|
|
|
|
|
} |
|
1225
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1226
|
1
|
50
|
|
|
|
|
}); } |
|
1227
|
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
|
|
1229
|
|
|
|
|
|
|
|
|
1230
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChild_val2) { xs::throw_guard(cv, [=]() |
|
1231
|
|
|
|
|
|
|
{ |
|
1232
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1233
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1234
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1235
|
|
|
|
|
|
|
{ |
|
1236
|
|
|
|
|
|
|
int RETVAL; |
|
1237
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1238
|
1
|
50
|
|
|
|
|
MyRefCountedChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1239
|
|
|
|
|
|
|
; |
|
1240
|
|
|
|
|
|
|
#line 200 "t/typemap/object/refcnt.xsi" |
|
1241
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1242
|
|
|
|
|
|
|
#line 1243 "t/typemap/object/object_xsgen.cc" |
|
1243
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1244
|
|
|
|
|
|
|
} |
|
1245
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1246
|
1
|
50
|
|
|
|
|
}); } |
|
1247
|
|
|
|
|
|
|
|
|
1248
|
|
|
|
|
|
|
|
|
1249
|
|
|
|
|
|
|
|
|
1250
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChild_DESTROY) { xs::throw_guard(cv, [=]() |
|
1251
|
|
|
|
|
|
|
{ |
|
1252
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1253
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1254
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1255
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1256
|
1
|
|
|
|
|
|
SP -= items; |
|
1257
|
|
|
|
|
|
|
{ |
|
1258
|
1
|
50
|
|
|
|
|
MyRefCountedChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1259
|
|
|
|
|
|
|
; |
|
1260
|
|
|
|
|
|
|
#line 204 "t/typemap/object/refcnt.xsi" |
|
1261
|
|
|
|
|
|
|
dcnt.perl++; |
|
1262
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1263
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1264
|
|
|
|
|
|
|
#line 1265 "t/typemap/object/object_xsgen.cc" |
|
1265
|
1
|
|
|
|
|
|
PUTBACK; |
|
1266
|
1
|
|
|
|
|
|
return; |
|
1267
|
|
|
|
|
|
|
} |
|
1268
|
1
|
50
|
|
|
|
|
}); } |
|
1269
|
|
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
|
|
1271
|
|
|
|
|
|
|
|
|
1272
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedIPTR_new) { xs::throw_guard(cv, [=]() |
|
1273
|
|
|
|
|
|
|
{ |
|
1274
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1275
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1276
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
1277
|
|
|
|
|
|
|
{ |
|
1278
|
4
|
|
|
|
|
|
PTRMyRefCountedIPTR RETVAL; |
|
1279
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1280
|
|
|
|
|
|
|
; |
|
1281
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1282
|
|
|
|
|
|
|
; |
|
1283
|
|
|
|
|
|
|
#line 213 "t/typemap/object/refcnt.xsi" |
|
1284
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1285
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1286
|
|
|
|
|
|
|
RETVAL = PTRMyRefCountedIPTR(new PTRMyRefCounted(val)); |
|
1287
|
|
|
|
|
|
|
#line 1288 "t/typemap/object/object_xsgen.cc" |
|
1288
|
|
|
|
|
|
|
{ |
|
1289
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1290
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1291
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1292
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1293
|
|
|
|
|
|
|
} |
|
1294
|
|
|
|
|
|
|
} |
|
1295
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1296
|
2
|
50
|
|
|
|
|
}); } |
|
1297
|
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
|
|
1299
|
|
|
|
|
|
|
|
|
1300
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedIPTR_val) { xs::throw_guard(cv, [=]() |
|
1301
|
|
|
|
|
|
|
{ |
|
1302
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1303
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
1304
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1305
|
|
|
|
|
|
|
{ |
|
1306
|
|
|
|
|
|
|
int RETVAL; |
|
1307
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1308
|
7
|
50
|
|
|
|
|
PTRMyRefCountedIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1309
|
|
|
|
|
|
|
; |
|
1310
|
|
|
|
|
|
|
#line 216 "t/typemap/object/refcnt.xsi" |
|
1311
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1312
|
|
|
|
|
|
|
#line 1313 "t/typemap/object/object_xsgen.cc" |
|
1313
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1314
|
|
|
|
|
|
|
} |
|
1315
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1316
|
4
|
50
|
|
|
|
|
}); } |
|
1317
|
|
|
|
|
|
|
|
|
1318
|
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
|
|
1320
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedIPTR_DESTROY) { xs::throw_guard(cv, [=]() |
|
1321
|
|
|
|
|
|
|
{ |
|
1322
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1323
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
1324
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1325
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1326
|
3
|
|
|
|
|
|
SP -= items; |
|
1327
|
|
|
|
|
|
|
{ |
|
1328
|
6
|
50
|
|
|
|
|
PTRMyRefCountedIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1329
|
|
|
|
|
|
|
; |
|
1330
|
|
|
|
|
|
|
#line 219 "t/typemap/object/refcnt.xsi" |
|
1331
|
|
|
|
|
|
|
dcnt.perl++; |
|
1332
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1333
|
|
|
|
|
|
|
#line 1334 "t/typemap/object/object_xsgen.cc" |
|
1334
|
3
|
|
|
|
|
|
PUTBACK; |
|
1335
|
6
|
|
|
|
|
|
return; |
|
1336
|
|
|
|
|
|
|
} |
|
1337
|
3
|
50
|
|
|
|
|
}); } |
|
1338
|
|
|
|
|
|
|
|
|
1339
|
|
|
|
|
|
|
|
|
1340
|
|
|
|
|
|
|
|
|
1341
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChildIPTR_new) { xs::throw_guard(cv, [=]() |
|
1342
|
|
|
|
|
|
|
{ |
|
1343
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1344
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1345
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val, val2"); |
|
1346
|
|
|
|
|
|
|
{ |
|
1347
|
2
|
|
|
|
|
|
PTRMyRefCountedChildIPTR RETVAL; |
|
1348
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1349
|
|
|
|
|
|
|
; |
|
1350
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1351
|
|
|
|
|
|
|
; |
|
1352
|
1
|
50
|
|
|
|
|
int val2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1353
|
|
|
|
|
|
|
; |
|
1354
|
|
|
|
|
|
|
#line 230 "t/typemap/object/refcnt.xsi" |
|
1355
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1356
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1357
|
|
|
|
|
|
|
RETVAL = PTRMyRefCountedChildIPTR(new PTRMyRefCountedChild(val, val2)); |
|
1358
|
|
|
|
|
|
|
#line 1359 "t/typemap/object/object_xsgen.cc" |
|
1359
|
|
|
|
|
|
|
{ |
|
1360
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1361
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1362
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1363
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1364
|
|
|
|
|
|
|
} |
|
1365
|
|
|
|
|
|
|
} |
|
1366
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1367
|
1
|
50
|
|
|
|
|
}); } |
|
1368
|
|
|
|
|
|
|
|
|
1369
|
|
|
|
|
|
|
|
|
1370
|
|
|
|
|
|
|
|
|
1371
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChildIPTR_val2) { xs::throw_guard(cv, [=]() |
|
1372
|
|
|
|
|
|
|
{ |
|
1373
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1374
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1375
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1376
|
|
|
|
|
|
|
{ |
|
1377
|
|
|
|
|
|
|
int RETVAL; |
|
1378
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1379
|
2
|
50
|
|
|
|
|
PTRMyRefCountedChildIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
; |
|
1381
|
|
|
|
|
|
|
#line 233 "t/typemap/object/refcnt.xsi" |
|
1382
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1383
|
|
|
|
|
|
|
#line 1384 "t/typemap/object/object_xsgen.cc" |
|
1384
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1385
|
|
|
|
|
|
|
} |
|
1386
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1387
|
1
|
50
|
|
|
|
|
}); } |
|
1388
|
|
|
|
|
|
|
|
|
1389
|
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
|
|
1391
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyRefCountedChildIPTR_DESTROY) { xs::throw_guard(cv, [=]() |
|
1392
|
|
|
|
|
|
|
{ |
|
1393
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1394
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1395
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1396
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1397
|
1
|
|
|
|
|
|
SP -= items; |
|
1398
|
|
|
|
|
|
|
{ |
|
1399
|
2
|
50
|
|
|
|
|
PTRMyRefCountedChildIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1400
|
|
|
|
|
|
|
; |
|
1401
|
|
|
|
|
|
|
#line 237 "t/typemap/object/refcnt.xsi" |
|
1402
|
|
|
|
|
|
|
dcnt.perl++; |
|
1403
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1404
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1405
|
|
|
|
|
|
|
#line 1406 "t/typemap/object/object_xsgen.cc" |
|
1406
|
1
|
|
|
|
|
|
PUTBACK; |
|
1407
|
2
|
|
|
|
|
|
return; |
|
1408
|
|
|
|
|
|
|
} |
|
1409
|
1
|
50
|
|
|
|
|
}); } |
|
1410
|
|
|
|
|
|
|
|
|
1411
|
|
|
|
|
|
|
|
|
1412
|
|
|
|
|
|
|
|
|
1413
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedIPTR_new) { xs::throw_guard(cv, [=]() |
|
1414
|
|
|
|
|
|
|
{ |
|
1415
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1416
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1417
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
1418
|
|
|
|
|
|
|
{ |
|
1419
|
4
|
|
|
|
|
|
MyRefCountedIPTR RETVAL; |
|
1420
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1421
|
|
|
|
|
|
|
; |
|
1422
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1423
|
|
|
|
|
|
|
; |
|
1424
|
|
|
|
|
|
|
#line 246 "t/typemap/object/refcnt.xsi" |
|
1425
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1426
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1427
|
|
|
|
|
|
|
RETVAL = MyRefCountedIPTR(new MyRefCounted(val)); |
|
1428
|
|
|
|
|
|
|
#line 1429 "t/typemap/object/object_xsgen.cc" |
|
1429
|
|
|
|
|
|
|
{ |
|
1430
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1431
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1432
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1433
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1434
|
|
|
|
|
|
|
} |
|
1435
|
|
|
|
|
|
|
} |
|
1436
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1437
|
2
|
50
|
|
|
|
|
}); } |
|
1438
|
|
|
|
|
|
|
|
|
1439
|
|
|
|
|
|
|
|
|
1440
|
|
|
|
|
|
|
|
|
1441
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedIPTR_val) { xs::throw_guard(cv, [=]() |
|
1442
|
|
|
|
|
|
|
{ |
|
1443
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1444
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
1445
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1446
|
|
|
|
|
|
|
{ |
|
1447
|
|
|
|
|
|
|
int RETVAL; |
|
1448
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1449
|
7
|
50
|
|
|
|
|
MyRefCountedIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1450
|
|
|
|
|
|
|
; |
|
1451
|
|
|
|
|
|
|
#line 249 "t/typemap/object/refcnt.xsi" |
|
1452
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1453
|
|
|
|
|
|
|
#line 1454 "t/typemap/object/object_xsgen.cc" |
|
1454
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1455
|
|
|
|
|
|
|
} |
|
1456
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
1457
|
4
|
50
|
|
|
|
|
}); } |
|
1458
|
|
|
|
|
|
|
|
|
1459
|
|
|
|
|
|
|
|
|
1460
|
|
|
|
|
|
|
|
|
1461
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedIPTR_DESTROY) { xs::throw_guard(cv, [=]() |
|
1462
|
|
|
|
|
|
|
{ |
|
1463
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1464
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
1465
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1466
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1467
|
3
|
|
|
|
|
|
SP -= items; |
|
1468
|
|
|
|
|
|
|
{ |
|
1469
|
6
|
50
|
|
|
|
|
MyRefCountedIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1470
|
|
|
|
|
|
|
; |
|
1471
|
|
|
|
|
|
|
#line 252 "t/typemap/object/refcnt.xsi" |
|
1472
|
|
|
|
|
|
|
dcnt.perl++; |
|
1473
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1474
|
|
|
|
|
|
|
#line 1475 "t/typemap/object/object_xsgen.cc" |
|
1475
|
3
|
|
|
|
|
|
PUTBACK; |
|
1476
|
6
|
|
|
|
|
|
return; |
|
1477
|
|
|
|
|
|
|
} |
|
1478
|
3
|
50
|
|
|
|
|
}); } |
|
1479
|
|
|
|
|
|
|
|
|
1480
|
|
|
|
|
|
|
|
|
1481
|
|
|
|
|
|
|
|
|
1482
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChildIPTR_new) { xs::throw_guard(cv, [=]() |
|
1483
|
|
|
|
|
|
|
{ |
|
1484
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1485
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1486
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, v1, v2"); |
|
1487
|
|
|
|
|
|
|
{ |
|
1488
|
2
|
|
|
|
|
|
MyRefCountedChildIPTR RETVAL; |
|
1489
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1490
|
|
|
|
|
|
|
; |
|
1491
|
1
|
50
|
|
|
|
|
int v1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1492
|
|
|
|
|
|
|
; |
|
1493
|
1
|
50
|
|
|
|
|
int v2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1494
|
|
|
|
|
|
|
; |
|
1495
|
|
|
|
|
|
|
#line 263 "t/typemap/object/refcnt.xsi" |
|
1496
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1497
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1498
|
|
|
|
|
|
|
RETVAL = MyRefCountedChildIPTR(new MyRefCountedChild(v1, v2)); |
|
1499
|
|
|
|
|
|
|
#line 1500 "t/typemap/object/object_xsgen.cc" |
|
1500
|
|
|
|
|
|
|
{ |
|
1501
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1502
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1503
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1504
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1505
|
|
|
|
|
|
|
} |
|
1506
|
|
|
|
|
|
|
} |
|
1507
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1508
|
1
|
50
|
|
|
|
|
}); } |
|
1509
|
|
|
|
|
|
|
|
|
1510
|
|
|
|
|
|
|
|
|
1511
|
|
|
|
|
|
|
|
|
1512
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChildIPTR_val2) { xs::throw_guard(cv, [=]() |
|
1513
|
|
|
|
|
|
|
{ |
|
1514
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1515
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1516
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1517
|
|
|
|
|
|
|
{ |
|
1518
|
|
|
|
|
|
|
int RETVAL; |
|
1519
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1520
|
2
|
50
|
|
|
|
|
MyRefCountedChildIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1521
|
|
|
|
|
|
|
; |
|
1522
|
|
|
|
|
|
|
#line 266 "t/typemap/object/refcnt.xsi" |
|
1523
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1524
|
|
|
|
|
|
|
#line 1525 "t/typemap/object/object_xsgen.cc" |
|
1525
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1526
|
|
|
|
|
|
|
} |
|
1527
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1528
|
1
|
50
|
|
|
|
|
}); } |
|
1529
|
|
|
|
|
|
|
|
|
1530
|
|
|
|
|
|
|
|
|
1531
|
|
|
|
|
|
|
|
|
1532
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyRefCountedChildIPTR_DESTROY) { xs::throw_guard(cv, [=]() |
|
1533
|
|
|
|
|
|
|
{ |
|
1534
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1535
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1536
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1537
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1538
|
1
|
|
|
|
|
|
SP -= items; |
|
1539
|
|
|
|
|
|
|
{ |
|
1540
|
2
|
50
|
|
|
|
|
MyRefCountedChildIPTR THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1541
|
|
|
|
|
|
|
; |
|
1542
|
|
|
|
|
|
|
#line 270 "t/typemap/object/refcnt.xsi" |
|
1543
|
|
|
|
|
|
|
dcnt.perl++; |
|
1544
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1545
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1546
|
|
|
|
|
|
|
#line 1547 "t/typemap/object/object_xsgen.cc" |
|
1547
|
1
|
|
|
|
|
|
PUTBACK; |
|
1548
|
2
|
|
|
|
|
|
return; |
|
1549
|
|
|
|
|
|
|
} |
|
1550
|
1
|
50
|
|
|
|
|
}); } |
|
1551
|
|
|
|
|
|
|
|
|
1552
|
|
|
|
|
|
|
|
|
1553
|
|
|
|
|
|
|
|
|
1554
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBaseSP_new) { xs::throw_guard(cv, [=]() |
|
1555
|
|
|
|
|
|
|
{ |
|
1556
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1557
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1558
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
1559
|
|
|
|
|
|
|
{ |
|
1560
|
2
|
|
|
|
|
|
PTRMyBaseSP RETVAL; |
|
1561
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1562
|
|
|
|
|
|
|
; |
|
1563
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1564
|
|
|
|
|
|
|
; |
|
1565
|
|
|
|
|
|
|
#line 279 "t/typemap/object/refcnt.xsi" |
|
1566
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1567
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1568
|
|
|
|
|
|
|
RETVAL = PTRMyBaseSP(new PTRMyBase(val)); |
|
1569
|
|
|
|
|
|
|
#line 1570 "t/typemap/object/object_xsgen.cc" |
|
1570
|
|
|
|
|
|
|
{ |
|
1571
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1572
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1573
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1574
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1575
|
|
|
|
|
|
|
} |
|
1576
|
|
|
|
|
|
|
} |
|
1577
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1578
|
2
|
50
|
|
|
|
|
}); } |
|
1579
|
|
|
|
|
|
|
|
|
1580
|
|
|
|
|
|
|
|
|
1581
|
|
|
|
|
|
|
|
|
1582
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBaseSP_val) { xs::throw_guard(cv, [=]() |
|
1583
|
|
|
|
|
|
|
{ |
|
1584
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1585
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
1586
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1587
|
|
|
|
|
|
|
{ |
|
1588
|
|
|
|
|
|
|
int RETVAL; |
|
1589
|
5
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1590
|
9
|
50
|
|
|
|
|
PTRMyBaseSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1591
|
|
|
|
|
|
|
; |
|
1592
|
|
|
|
|
|
|
#line 282 "t/typemap/object/refcnt.xsi" |
|
1593
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1594
|
|
|
|
|
|
|
#line 1595 "t/typemap/object/object_xsgen.cc" |
|
1595
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1596
|
|
|
|
|
|
|
} |
|
1597
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
1598
|
5
|
50
|
|
|
|
|
}); } |
|
1599
|
|
|
|
|
|
|
|
|
1600
|
|
|
|
|
|
|
|
|
1601
|
|
|
|
|
|
|
|
|
1602
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyBaseSP_DESTROY) { xs::throw_guard(cv, [=]() |
|
1603
|
|
|
|
|
|
|
{ |
|
1604
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1605
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
1606
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1607
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1608
|
4
|
|
|
|
|
|
SP -= items; |
|
1609
|
|
|
|
|
|
|
{ |
|
1610
|
8
|
50
|
|
|
|
|
PTRMyBaseSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1611
|
|
|
|
|
|
|
; |
|
1612
|
|
|
|
|
|
|
#line 285 "t/typemap/object/refcnt.xsi" |
|
1613
|
|
|
|
|
|
|
dcnt.perl++; |
|
1614
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1615
|
|
|
|
|
|
|
#line 1616 "t/typemap/object/object_xsgen.cc" |
|
1616
|
4
|
|
|
|
|
|
PUTBACK; |
|
1617
|
8
|
|
|
|
|
|
return; |
|
1618
|
|
|
|
|
|
|
} |
|
1619
|
4
|
50
|
|
|
|
|
}); } |
|
1620
|
|
|
|
|
|
|
|
|
1621
|
|
|
|
|
|
|
|
|
1622
|
|
|
|
|
|
|
|
|
1623
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChildSP_new) { xs::throw_guard(cv, [=]() |
|
1624
|
|
|
|
|
|
|
{ |
|
1625
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1626
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1627
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val, val2"); |
|
1628
|
|
|
|
|
|
|
{ |
|
1629
|
1
|
|
|
|
|
|
PTRMyChildSP RETVAL; |
|
1630
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1631
|
|
|
|
|
|
|
; |
|
1632
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1633
|
|
|
|
|
|
|
; |
|
1634
|
1
|
50
|
|
|
|
|
int val2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1635
|
|
|
|
|
|
|
; |
|
1636
|
|
|
|
|
|
|
#line 296 "t/typemap/object/refcnt.xsi" |
|
1637
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1638
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1639
|
|
|
|
|
|
|
RETVAL = PTRMyChildSP(new PTRMyChild(val, val2)); |
|
1640
|
|
|
|
|
|
|
#line 1641 "t/typemap/object/object_xsgen.cc" |
|
1641
|
|
|
|
|
|
|
{ |
|
1642
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1643
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1644
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1645
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1646
|
|
|
|
|
|
|
} |
|
1647
|
|
|
|
|
|
|
} |
|
1648
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1649
|
1
|
50
|
|
|
|
|
}); } |
|
1650
|
|
|
|
|
|
|
|
|
1651
|
|
|
|
|
|
|
|
|
1652
|
|
|
|
|
|
|
|
|
1653
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChildSP_val2) { xs::throw_guard(cv, [=]() |
|
1654
|
|
|
|
|
|
|
{ |
|
1655
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1656
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1657
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1658
|
|
|
|
|
|
|
{ |
|
1659
|
|
|
|
|
|
|
int RETVAL; |
|
1660
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1661
|
2
|
50
|
|
|
|
|
PTRMyChildSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1662
|
|
|
|
|
|
|
; |
|
1663
|
|
|
|
|
|
|
#line 299 "t/typemap/object/refcnt.xsi" |
|
1664
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1665
|
|
|
|
|
|
|
#line 1666 "t/typemap/object/object_xsgen.cc" |
|
1666
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1667
|
|
|
|
|
|
|
} |
|
1668
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1669
|
1
|
50
|
|
|
|
|
}); } |
|
1670
|
|
|
|
|
|
|
|
|
1671
|
|
|
|
|
|
|
|
|
1672
|
|
|
|
|
|
|
|
|
1673
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyChildSP_DESTROY) { xs::throw_guard(cv, [=]() |
|
1674
|
|
|
|
|
|
|
{ |
|
1675
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1676
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1677
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1678
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1679
|
1
|
|
|
|
|
|
SP -= items; |
|
1680
|
|
|
|
|
|
|
{ |
|
1681
|
2
|
50
|
|
|
|
|
PTRMyChildSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1682
|
|
|
|
|
|
|
; |
|
1683
|
|
|
|
|
|
|
#line 303 "t/typemap/object/refcnt.xsi" |
|
1684
|
|
|
|
|
|
|
dcnt.perl++; |
|
1685
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1686
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1687
|
|
|
|
|
|
|
#line 1688 "t/typemap/object/object_xsgen.cc" |
|
1688
|
1
|
|
|
|
|
|
PUTBACK; |
|
1689
|
2
|
|
|
|
|
|
return; |
|
1690
|
|
|
|
|
|
|
} |
|
1691
|
1
|
50
|
|
|
|
|
}); } |
|
1692
|
|
|
|
|
|
|
|
|
1693
|
|
|
|
|
|
|
|
|
1694
|
|
|
|
|
|
|
|
|
1695
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseSP_new) { xs::throw_guard(cv, [=]() |
|
1696
|
|
|
|
|
|
|
{ |
|
1697
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1698
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
1699
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val"); |
|
1700
|
|
|
|
|
|
|
{ |
|
1701
|
2
|
|
|
|
|
|
MyBaseSP RETVAL; |
|
1702
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1703
|
|
|
|
|
|
|
; |
|
1704
|
2
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1705
|
|
|
|
|
|
|
; |
|
1706
|
|
|
|
|
|
|
#line 312 "t/typemap/object/refcnt.xsi" |
|
1707
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1708
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1709
|
|
|
|
|
|
|
RETVAL = MyBaseSP(new MyBase(val)); |
|
1710
|
|
|
|
|
|
|
#line 1711 "t/typemap/object/object_xsgen.cc" |
|
1711
|
|
|
|
|
|
|
{ |
|
1712
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1713
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1714
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1715
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1716
|
|
|
|
|
|
|
} |
|
1717
|
|
|
|
|
|
|
} |
|
1718
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1719
|
2
|
50
|
|
|
|
|
}); } |
|
1720
|
|
|
|
|
|
|
|
|
1721
|
|
|
|
|
|
|
|
|
1722
|
|
|
|
|
|
|
|
|
1723
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseSP_val) { xs::throw_guard(cv, [=]() |
|
1724
|
|
|
|
|
|
|
{ |
|
1725
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1726
|
5
|
50
|
|
|
|
|
if (items != 1) |
|
1727
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1728
|
|
|
|
|
|
|
{ |
|
1729
|
|
|
|
|
|
|
int RETVAL; |
|
1730
|
5
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1731
|
9
|
50
|
|
|
|
|
MyBaseSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1732
|
|
|
|
|
|
|
; |
|
1733
|
|
|
|
|
|
|
#line 315 "t/typemap/object/refcnt.xsi" |
|
1734
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1735
|
|
|
|
|
|
|
#line 1736 "t/typemap/object/object_xsgen.cc" |
|
1736
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1737
|
|
|
|
|
|
|
} |
|
1738
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
1739
|
5
|
50
|
|
|
|
|
}); } |
|
1740
|
|
|
|
|
|
|
|
|
1741
|
|
|
|
|
|
|
|
|
1742
|
|
|
|
|
|
|
|
|
1743
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseSP_DESTROY) { xs::throw_guard(cv, [=]() |
|
1744
|
|
|
|
|
|
|
{ |
|
1745
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1746
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
1747
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1748
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1749
|
4
|
|
|
|
|
|
SP -= items; |
|
1750
|
|
|
|
|
|
|
{ |
|
1751
|
8
|
50
|
|
|
|
|
MyBaseSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1752
|
|
|
|
|
|
|
; |
|
1753
|
|
|
|
|
|
|
#line 318 "t/typemap/object/refcnt.xsi" |
|
1754
|
|
|
|
|
|
|
dcnt.perl++; |
|
1755
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1756
|
|
|
|
|
|
|
#line 1757 "t/typemap/object/object_xsgen.cc" |
|
1757
|
4
|
|
|
|
|
|
PUTBACK; |
|
1758
|
8
|
|
|
|
|
|
return; |
|
1759
|
|
|
|
|
|
|
} |
|
1760
|
4
|
50
|
|
|
|
|
}); } |
|
1761
|
|
|
|
|
|
|
|
|
1762
|
|
|
|
|
|
|
|
|
1763
|
|
|
|
|
|
|
|
|
1764
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChildSP_new) { xs::throw_guard(cv, [=]() |
|
1765
|
|
|
|
|
|
|
{ |
|
1766
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1767
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1768
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, val, val2"); |
|
1769
|
|
|
|
|
|
|
{ |
|
1770
|
1
|
|
|
|
|
|
MyChildSP RETVAL; |
|
1771
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1772
|
|
|
|
|
|
|
; |
|
1773
|
1
|
50
|
|
|
|
|
int val = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1774
|
|
|
|
|
|
|
; |
|
1775
|
1
|
50
|
|
|
|
|
int val2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1776
|
|
|
|
|
|
|
; |
|
1777
|
|
|
|
|
|
|
#line 329 "t/typemap/object/refcnt.xsi" |
|
1778
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1779
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1780
|
|
|
|
|
|
|
RETVAL = MyChildSP(new MyChild(val, val2)); |
|
1781
|
|
|
|
|
|
|
#line 1782 "t/typemap/object/object_xsgen.cc" |
|
1782
|
|
|
|
|
|
|
{ |
|
1783
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1784
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1785
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1786
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1787
|
|
|
|
|
|
|
} |
|
1788
|
|
|
|
|
|
|
} |
|
1789
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1790
|
1
|
50
|
|
|
|
|
}); } |
|
1791
|
|
|
|
|
|
|
|
|
1792
|
|
|
|
|
|
|
|
|
1793
|
|
|
|
|
|
|
|
|
1794
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChildSP_val2) { xs::throw_guard(cv, [=]() |
|
1795
|
|
|
|
|
|
|
{ |
|
1796
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1797
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1798
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1799
|
|
|
|
|
|
|
{ |
|
1800
|
|
|
|
|
|
|
int RETVAL; |
|
1801
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1802
|
2
|
50
|
|
|
|
|
MyChildSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1803
|
|
|
|
|
|
|
; |
|
1804
|
|
|
|
|
|
|
#line 332 "t/typemap/object/refcnt.xsi" |
|
1805
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
1806
|
|
|
|
|
|
|
#line 1807 "t/typemap/object/object_xsgen.cc" |
|
1807
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
1808
|
|
|
|
|
|
|
} |
|
1809
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1810
|
1
|
50
|
|
|
|
|
}); } |
|
1811
|
|
|
|
|
|
|
|
|
1812
|
|
|
|
|
|
|
|
|
1813
|
|
|
|
|
|
|
|
|
1814
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyChildSP_DESTROY) { xs::throw_guard(cv, [=]() |
|
1815
|
|
|
|
|
|
|
{ |
|
1816
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1817
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
1818
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1819
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1820
|
1
|
|
|
|
|
|
SP -= items; |
|
1821
|
|
|
|
|
|
|
{ |
|
1822
|
2
|
50
|
|
|
|
|
MyChildSP THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1823
|
|
|
|
|
|
|
; |
|
1824
|
|
|
|
|
|
|
#line 336 "t/typemap/object/refcnt.xsi" |
|
1825
|
|
|
|
|
|
|
dcnt.perl++; |
|
1826
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
1827
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1828
|
|
|
|
|
|
|
#line 1829 "t/typemap/object/object_xsgen.cc" |
|
1829
|
1
|
|
|
|
|
|
PUTBACK; |
|
1830
|
2
|
|
|
|
|
|
return; |
|
1831
|
|
|
|
|
|
|
} |
|
1832
|
1
|
50
|
|
|
|
|
}); } |
|
1833
|
|
|
|
|
|
|
|
|
1834
|
|
|
|
|
|
|
|
|
1835
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'refcnt.xsi' */ |
|
1836
|
|
|
|
|
|
|
|
|
1837
|
|
|
|
|
|
|
|
|
1838
|
|
|
|
|
|
|
/* INCLUDE: Including 'static_cast.xsi' from 'object.xs' */ |
|
1839
|
|
|
|
|
|
|
|
|
1840
|
|
|
|
|
|
|
template |
|
1841
|
|
|
|
|
|
|
class _MyStatic { |
|
1842
|
|
|
|
|
|
|
public: |
|
1843
|
|
|
|
|
|
|
int val; |
|
1844
|
4
|
|
|
|
|
|
_MyStatic (int val) : val(val) { } |
|
1845
|
12
|
50
|
|
|
|
|
virtual ~_MyStatic () {} |
|
|
|
50
|
|
|
|
|
|
|
1846
|
|
|
|
|
|
|
}; |
|
1847
|
|
|
|
|
|
|
template |
|
1848
|
8
|
50
|
|
|
|
|
class _MyStaticChild : public _MyStatic { |
|
|
|
50
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
public: |
|
1850
|
|
|
|
|
|
|
int val2; |
|
1851
|
4
|
|
|
|
|
|
_MyStaticChild (int val, int val2) : _MyStatic(val), val2(val2) { } |
|
1852
|
|
|
|
|
|
|
}; |
|
1853
|
|
|
|
|
|
|
using PTRMyStatic = _MyStatic<0>; |
|
1854
|
|
|
|
|
|
|
using PTRMyStaticChild = _MyStaticChild<0>; |
|
1855
|
|
|
|
|
|
|
using MyStatic = _MyStatic<1>; |
|
1856
|
|
|
|
|
|
|
using MyStaticChild = _MyStaticChild<1>; |
|
1857
|
|
|
|
|
|
|
namespace xs { |
|
1858
|
|
|
|
|
|
|
|
|
1859
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
1860
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyStatic"; } |
|
1861
|
|
|
|
|
|
|
}; |
|
1862
|
|
|
|
|
|
|
|
|
1863
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
1864
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyStaticChild"; } |
|
1865
|
|
|
|
|
|
|
}; |
|
1866
|
|
|
|
|
|
|
|
|
1867
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
|
1868
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MyStatic"; } |
|
1869
|
|
|
|
|
|
|
}; |
|
1870
|
|
|
|
|
|
|
|
|
1871
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
|
1872
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MyStaticChild"; } |
|
1873
|
|
|
|
|
|
|
}; |
|
1874
|
|
|
|
|
|
|
} |
|
1875
|
|
|
|
|
|
|
|
|
1876
|
|
|
|
|
|
|
|
|
1877
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyStatic_new) { xs::throw_guard(cv, [=]() |
|
1878
|
|
|
|
|
|
|
{ |
|
1879
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1880
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
1881
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
1882
|
|
|
|
|
|
|
{ |
|
1883
|
|
|
|
|
|
|
PTRMyStatic * RETVAL; |
|
1884
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1885
|
|
|
|
|
|
|
; |
|
1886
|
1
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1887
|
|
|
|
|
|
|
; |
|
1888
|
|
|
|
|
|
|
#line 48 "t/typemap/object/static_cast.xsi" |
|
1889
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1890
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1891
|
|
|
|
|
|
|
if (arg) RETVAL = new PTRMyStatic(arg); |
|
1892
|
|
|
|
|
|
|
else RETVAL = NULL; |
|
1893
|
|
|
|
|
|
|
#line 1894 "t/typemap/object/object_xsgen.cc" |
|
1894
|
|
|
|
|
|
|
{ |
|
1895
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1896
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1897
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1898
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1899
|
|
|
|
|
|
|
} |
|
1900
|
|
|
|
|
|
|
} |
|
1901
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1902
|
1
|
50
|
|
|
|
|
}); } |
|
1903
|
|
|
|
|
|
|
|
|
1904
|
|
|
|
|
|
|
|
|
1905
|
|
|
|
|
|
|
|
|
1906
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyStatic_val) { xs::throw_guard(cv, [=]() |
|
1907
|
|
|
|
|
|
|
{ |
|
1908
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1909
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
1910
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
1911
|
|
|
|
|
|
|
{ |
|
1912
|
|
|
|
|
|
|
int RETVAL; |
|
1913
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1914
|
4
|
50
|
|
|
|
|
PTRMyStatic* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1915
|
|
|
|
|
|
|
; |
|
1916
|
|
|
|
|
|
|
SV* newval; |
|
1917
|
|
|
|
|
|
|
|
|
1918
|
2
|
50
|
|
|
|
|
if (items < 2) |
|
1919
|
2
|
|
|
|
|
|
newval = NULL; |
|
1920
|
|
|
|
|
|
|
else { |
|
1921
|
0
|
|
|
|
|
|
newval = ST(1) |
|
1922
|
0
|
|
|
|
|
|
; |
|
1923
|
|
|
|
|
|
|
} |
|
1924
|
|
|
|
|
|
|
#line 53 "t/typemap/object/static_cast.xsi" |
|
1925
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
1926
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
1927
|
|
|
|
|
|
|
#line 1928 "t/typemap/object/object_xsgen.cc" |
|
1928
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
1929
|
|
|
|
|
|
|
} |
|
1930
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
1931
|
4
|
50
|
|
|
|
|
}); } |
|
1932
|
|
|
|
|
|
|
|
|
1933
|
|
|
|
|
|
|
|
|
1934
|
|
|
|
|
|
|
|
|
1935
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyStatic_DESTROY) { xs::throw_guard(cv, [=]() |
|
1936
|
|
|
|
|
|
|
{ |
|
1937
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1938
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
1939
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
1940
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
1941
|
2
|
|
|
|
|
|
SP -= items; |
|
1942
|
|
|
|
|
|
|
{ |
|
1943
|
2
|
50
|
|
|
|
|
PTRMyStatic* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1944
|
|
|
|
|
|
|
; |
|
1945
|
|
|
|
|
|
|
#line 57 "t/typemap/object/static_cast.xsi" |
|
1946
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
1947
|
|
|
|
|
|
|
#line 1948 "t/typemap/object/object_xsgen.cc" |
|
1948
|
2
|
|
|
|
|
|
PUTBACK; |
|
1949
|
2
|
|
|
|
|
|
return; |
|
1950
|
|
|
|
|
|
|
} |
|
1951
|
2
|
50
|
|
|
|
|
}); } |
|
1952
|
|
|
|
|
|
|
|
|
1953
|
|
|
|
|
|
|
|
|
1954
|
|
|
|
|
|
|
|
|
1955
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyStaticChild_new) { xs::throw_guard(cv, [=]() |
|
1956
|
|
|
|
|
|
|
{ |
|
1957
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1958
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
1959
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg1, arg2"); |
|
1960
|
|
|
|
|
|
|
{ |
|
1961
|
|
|
|
|
|
|
PTRMyStaticChild * RETVAL; |
|
1962
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
1963
|
|
|
|
|
|
|
; |
|
1964
|
1
|
50
|
|
|
|
|
int arg1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
1965
|
|
|
|
|
|
|
; |
|
1966
|
1
|
50
|
|
|
|
|
int arg2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
1967
|
|
|
|
|
|
|
; |
|
1968
|
|
|
|
|
|
|
#line 69 "t/typemap/object/static_cast.xsi" |
|
1969
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
1970
|
|
|
|
|
|
|
PROTO = CLASS; |
|
1971
|
|
|
|
|
|
|
if (arg1 || arg2) RETVAL = new PTRMyStaticChild(arg1, arg2); |
|
1972
|
|
|
|
|
|
|
else RETVAL = NULL; |
|
1973
|
|
|
|
|
|
|
#line 1974 "t/typemap/object/object_xsgen.cc" |
|
1974
|
|
|
|
|
|
|
{ |
|
1975
|
|
|
|
|
|
|
SV * RETVALSV; |
|
1976
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
1977
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
1978
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
1979
|
|
|
|
|
|
|
} |
|
1980
|
|
|
|
|
|
|
} |
|
1981
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
1982
|
1
|
50
|
|
|
|
|
}); } |
|
1983
|
|
|
|
|
|
|
|
|
1984
|
|
|
|
|
|
|
|
|
1985
|
|
|
|
|
|
|
|
|
1986
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__PTRMyStaticChild_val2) { xs::throw_guard(cv, [=]() |
|
1987
|
|
|
|
|
|
|
{ |
|
1988
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
1989
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
1990
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
1991
|
|
|
|
|
|
|
{ |
|
1992
|
|
|
|
|
|
|
int RETVAL; |
|
1993
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
1994
|
2
|
50
|
|
|
|
|
PTRMyStaticChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1995
|
|
|
|
|
|
|
; |
|
1996
|
|
|
|
|
|
|
SV* newval; |
|
1997
|
|
|
|
|
|
|
|
|
1998
|
1
|
50
|
|
|
|
|
if (items < 2) |
|
1999
|
1
|
|
|
|
|
|
newval = NULL; |
|
2000
|
|
|
|
|
|
|
else { |
|
2001
|
0
|
|
|
|
|
|
newval = ST(1) |
|
2002
|
0
|
|
|
|
|
|
; |
|
2003
|
|
|
|
|
|
|
} |
|
2004
|
|
|
|
|
|
|
#line 74 "t/typemap/object/static_cast.xsi" |
|
2005
|
|
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
2006
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
2007
|
|
|
|
|
|
|
#line 2008 "t/typemap/object/object_xsgen.cc" |
|
2008
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2009
|
|
|
|
|
|
|
} |
|
2010
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2011
|
2
|
50
|
|
|
|
|
}); } |
|
2012
|
|
|
|
|
|
|
|
|
2013
|
|
|
|
|
|
|
|
|
2014
|
|
|
|
|
|
|
|
|
2015
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyStatic_new) { xs::throw_guard(cv, [=]() |
|
2016
|
|
|
|
|
|
|
{ |
|
2017
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2018
|
1
|
50
|
|
|
|
|
if (items != 2) |
|
2019
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
2020
|
|
|
|
|
|
|
{ |
|
2021
|
|
|
|
|
|
|
MyStatic * RETVAL; |
|
2022
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2023
|
|
|
|
|
|
|
; |
|
2024
|
1
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2025
|
|
|
|
|
|
|
; |
|
2026
|
|
|
|
|
|
|
#line 84 "t/typemap/object/static_cast.xsi" |
|
2027
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2028
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2029
|
|
|
|
|
|
|
if (arg) RETVAL = new MyStatic(arg); |
|
2030
|
|
|
|
|
|
|
else RETVAL = NULL; |
|
2031
|
|
|
|
|
|
|
#line 2032 "t/typemap/object/object_xsgen.cc" |
|
2032
|
|
|
|
|
|
|
{ |
|
2033
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2034
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2035
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2036
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2037
|
|
|
|
|
|
|
} |
|
2038
|
|
|
|
|
|
|
} |
|
2039
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2040
|
1
|
50
|
|
|
|
|
}); } |
|
2041
|
|
|
|
|
|
|
|
|
2042
|
|
|
|
|
|
|
|
|
2043
|
|
|
|
|
|
|
|
|
2044
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyStatic_val) { xs::throw_guard(cv, [=]() |
|
2045
|
|
|
|
|
|
|
{ |
|
2046
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2047
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2048
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2049
|
|
|
|
|
|
|
{ |
|
2050
|
|
|
|
|
|
|
int RETVAL; |
|
2051
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2052
|
4
|
50
|
|
|
|
|
MyStatic* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
2053
|
|
|
|
|
|
|
; |
|
2054
|
|
|
|
|
|
|
SV* newval; |
|
2055
|
|
|
|
|
|
|
|
|
2056
|
2
|
50
|
|
|
|
|
if (items < 2) |
|
2057
|
2
|
|
|
|
|
|
newval = NULL; |
|
2058
|
|
|
|
|
|
|
else { |
|
2059
|
0
|
|
|
|
|
|
newval = ST(1) |
|
2060
|
0
|
|
|
|
|
|
; |
|
2061
|
|
|
|
|
|
|
} |
|
2062
|
|
|
|
|
|
|
#line 89 "t/typemap/object/static_cast.xsi" |
|
2063
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
2064
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
2065
|
|
|
|
|
|
|
#line 2066 "t/typemap/object/object_xsgen.cc" |
|
2066
|
2
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2067
|
|
|
|
|
|
|
} |
|
2068
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2069
|
4
|
50
|
|
|
|
|
}); } |
|
2070
|
|
|
|
|
|
|
|
|
2071
|
|
|
|
|
|
|
|
|
2072
|
|
|
|
|
|
|
|
|
2073
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyStatic_DESTROY) { xs::throw_guard(cv, [=]() |
|
2074
|
|
|
|
|
|
|
{ |
|
2075
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2076
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
2077
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2078
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2079
|
2
|
|
|
|
|
|
SP -= items; |
|
2080
|
|
|
|
|
|
|
{ |
|
2081
|
2
|
50
|
|
|
|
|
MyStatic* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2082
|
|
|
|
|
|
|
; |
|
2083
|
|
|
|
|
|
|
#line 93 "t/typemap/object/static_cast.xsi" |
|
2084
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2085
|
|
|
|
|
|
|
#line 2086 "t/typemap/object/object_xsgen.cc" |
|
2086
|
2
|
|
|
|
|
|
PUTBACK; |
|
2087
|
2
|
|
|
|
|
|
return; |
|
2088
|
|
|
|
|
|
|
} |
|
2089
|
2
|
50
|
|
|
|
|
}); } |
|
2090
|
|
|
|
|
|
|
|
|
2091
|
|
|
|
|
|
|
|
|
2092
|
|
|
|
|
|
|
|
|
2093
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyStaticChild_new) { xs::throw_guard(cv, [=]() |
|
2094
|
|
|
|
|
|
|
{ |
|
2095
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2096
|
1
|
50
|
|
|
|
|
if (items != 3) |
|
2097
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg1, arg2"); |
|
2098
|
|
|
|
|
|
|
{ |
|
2099
|
|
|
|
|
|
|
MyStaticChild * RETVAL; |
|
2100
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2101
|
|
|
|
|
|
|
; |
|
2102
|
1
|
50
|
|
|
|
|
int arg1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2103
|
|
|
|
|
|
|
; |
|
2104
|
1
|
50
|
|
|
|
|
int arg2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2105
|
|
|
|
|
|
|
; |
|
2106
|
|
|
|
|
|
|
#line 105 "t/typemap/object/static_cast.xsi" |
|
2107
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2108
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2109
|
|
|
|
|
|
|
if (arg1 || arg2) RETVAL = new MyStaticChild(arg1, arg2); |
|
2110
|
|
|
|
|
|
|
else RETVAL = NULL; |
|
2111
|
|
|
|
|
|
|
#line 2112 "t/typemap/object/object_xsgen.cc" |
|
2112
|
|
|
|
|
|
|
{ |
|
2113
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2114
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2115
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2116
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2117
|
|
|
|
|
|
|
} |
|
2118
|
|
|
|
|
|
|
} |
|
2119
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2120
|
1
|
50
|
|
|
|
|
}); } |
|
2121
|
|
|
|
|
|
|
|
|
2122
|
|
|
|
|
|
|
|
|
2123
|
|
|
|
|
|
|
|
|
2124
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyStaticChild_val2) { xs::throw_guard(cv, [=]() |
|
2125
|
|
|
|
|
|
|
{ |
|
2126
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2127
|
2
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2128
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2129
|
|
|
|
|
|
|
{ |
|
2130
|
|
|
|
|
|
|
int RETVAL; |
|
2131
|
2
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2132
|
2
|
50
|
|
|
|
|
MyStaticChild* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
2133
|
|
|
|
|
|
|
; |
|
2134
|
|
|
|
|
|
|
SV* newval; |
|
2135
|
|
|
|
|
|
|
|
|
2136
|
1
|
50
|
|
|
|
|
if (items < 2) |
|
2137
|
1
|
|
|
|
|
|
newval = NULL; |
|
2138
|
|
|
|
|
|
|
else { |
|
2139
|
0
|
|
|
|
|
|
newval = ST(1) |
|
2140
|
0
|
|
|
|
|
|
; |
|
2141
|
|
|
|
|
|
|
} |
|
2142
|
|
|
|
|
|
|
#line 110 "t/typemap/object/static_cast.xsi" |
|
2143
|
|
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
2144
|
|
|
|
|
|
|
RETVAL = THIS->val2; |
|
2145
|
|
|
|
|
|
|
#line 2146 "t/typemap/object/object_xsgen.cc" |
|
2146
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2147
|
|
|
|
|
|
|
} |
|
2148
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
2149
|
2
|
50
|
|
|
|
|
}); } |
|
2150
|
|
|
|
|
|
|
|
|
2151
|
|
|
|
|
|
|
|
|
2152
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'static_cast.xsi' */ |
|
2153
|
|
|
|
|
|
|
|
|
2154
|
|
|
|
|
|
|
|
|
2155
|
|
|
|
|
|
|
/* INCLUDE: Including 'backref.xsi' from 'object.xs' */ |
|
2156
|
|
|
|
|
|
|
|
|
2157
|
|
|
|
|
|
|
struct BRUnit : panda::Refcnt { |
|
2158
|
|
|
|
|
|
|
int id; |
|
2159
|
|
|
|
|
|
|
|
|
2160
|
18
|
|
|
|
|
|
BRUnit (int id) : id(id) {} |
|
2161
|
|
|
|
|
|
|
|
|
2162
|
0
|
|
|
|
|
|
virtual BRUnit* clone () { |
|
2163
|
|
|
|
|
|
|
//printf("br unit clone\n"); |
|
2164
|
0
|
0
|
|
|
|
|
return new BRUnit(id); |
|
2165
|
|
|
|
|
|
|
} |
|
2166
|
|
|
|
|
|
|
|
|
2167
|
18
|
|
|
|
|
|
virtual ~BRUnit () { |
|
2168
|
|
|
|
|
|
|
//printf("~BRUnit\n"); |
|
2169
|
8
|
|
|
|
|
|
dcnt.c++; |
|
2170
|
10
|
50
|
|
|
|
|
} |
|
2171
|
|
|
|
|
|
|
}; |
|
2172
|
|
|
|
|
|
|
struct BRUnitEnabled : BRUnit, Backref { |
|
2173
|
14
|
|
|
|
|
|
using BRUnit::BRUnit; |
|
2174
|
|
|
|
|
|
|
|
|
2175
|
0
|
|
|
|
|
|
BRUnit* clone () override { |
|
2176
|
|
|
|
|
|
|
//printf("BRUnitEnabled::clone()\n"); |
|
2177
|
0
|
0
|
|
|
|
|
return new BRUnitEnabled(this->id); |
|
2178
|
|
|
|
|
|
|
} |
|
2179
|
|
|
|
|
|
|
|
|
2180
|
24
|
50
|
|
|
|
|
~BRUnitEnabled () { Backref::dtor(); } |
|
2181
|
|
|
|
|
|
|
}; |
|
2182
|
|
|
|
|
|
|
struct BRStorage { |
|
2183
|
8
|
|
|
|
|
|
BRStorage () : unit(NULL) {} |
|
2184
|
|
|
|
|
|
|
|
|
2185
|
18
|
|
|
|
|
|
const panda::iptr& get_unit () const { return unit; } |
|
2186
|
|
|
|
|
|
|
|
|
2187
|
24
|
|
|
|
|
|
void set_unit (BRUnit* val) { unit = val; } |
|
2188
|
0
|
0
|
|
|
|
|
void set_unit_with_id (int id) { unit = new BRUnit(id); } |
|
2189
|
0
|
0
|
|
|
|
|
void set_unit_with_id2 (int id) { unit = new BRUnitEnabled(id); } |
|
2190
|
|
|
|
|
|
|
|
|
2191
|
12
|
|
|
|
|
|
virtual ~BRStorage () { |
|
2192
|
|
|
|
|
|
|
//printf("~BRStorage\n"); |
|
2193
|
4
|
|
|
|
|
|
dcnt.c++; |
|
2194
|
8
|
50
|
|
|
|
|
} |
|
2195
|
|
|
|
|
|
|
|
|
2196
|
0
|
|
|
|
|
|
virtual BRStorage* clone () { |
|
2197
|
|
|
|
|
|
|
//printf("BRStorage::clone()\n"); |
|
2198
|
0
|
0
|
|
|
|
|
BRStorage* ret = new BRStorage(); |
|
2199
|
0
|
|
|
|
|
|
ret->set_unit(unit->clone()); |
|
2200
|
0
|
|
|
|
|
|
return ret; |
|
2201
|
|
|
|
|
|
|
} |
|
2202
|
|
|
|
|
|
|
private: |
|
2203
|
|
|
|
|
|
|
panda::iptr unit; |
|
2204
|
|
|
|
|
|
|
}; |
|
2205
|
|
|
|
|
|
|
namespace xs { |
|
2206
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2207
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::BRUnit"; } |
|
2208
|
|
|
|
|
|
|
static BRUnit* dup (BRUnit* obj) { return obj->clone(); } |
|
2209
|
|
|
|
|
|
|
}; |
|
2210
|
|
|
|
|
|
|
|
|
2211
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2212
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::BRStorage"; } |
|
2213
|
|
|
|
|
|
|
static BRStorage* dup (BRStorage* obj) { return obj->clone(); } |
|
2214
|
|
|
|
|
|
|
}; |
|
2215
|
|
|
|
|
|
|
} |
|
2216
|
|
|
|
|
|
|
|
|
2217
|
|
|
|
|
|
|
|
|
2218
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_new) { xs::throw_guard(cv, [=]() |
|
2219
|
|
|
|
|
|
|
{ |
|
2220
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2221
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2222
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, id"); |
|
2223
|
|
|
|
|
|
|
{ |
|
2224
|
|
|
|
|
|
|
BRUnit * RETVAL; |
|
2225
|
2
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2226
|
|
|
|
|
|
|
; |
|
2227
|
2
|
50
|
|
|
|
|
int id = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2228
|
|
|
|
|
|
|
; |
|
2229
|
|
|
|
|
|
|
#line 70 "t/typemap/object/backref.xsi" |
|
2230
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2231
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2232
|
|
|
|
|
|
|
RETVAL = new BRUnit(id); |
|
2233
|
|
|
|
|
|
|
#line 2234 "t/typemap/object/object_xsgen.cc" |
|
2234
|
|
|
|
|
|
|
{ |
|
2235
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2236
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2237
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2238
|
2
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2239
|
|
|
|
|
|
|
} |
|
2240
|
|
|
|
|
|
|
} |
|
2241
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
2242
|
2
|
50
|
|
|
|
|
}); } |
|
2243
|
|
|
|
|
|
|
|
|
2244
|
|
|
|
|
|
|
|
|
2245
|
|
|
|
|
|
|
|
|
2246
|
14
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_new_enabled) { xs::throw_guard(cv, [=]() |
|
2247
|
|
|
|
|
|
|
{ |
|
2248
|
7
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2249
|
7
|
50
|
|
|
|
|
if (items != 2) |
|
2250
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, id"); |
|
2251
|
|
|
|
|
|
|
{ |
|
2252
|
|
|
|
|
|
|
BRUnit * RETVAL; |
|
2253
|
7
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2254
|
|
|
|
|
|
|
; |
|
2255
|
7
|
50
|
|
|
|
|
int id = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2256
|
|
|
|
|
|
|
; |
|
2257
|
|
|
|
|
|
|
#line 73 "t/typemap/object/backref.xsi" |
|
2258
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2259
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2260
|
|
|
|
|
|
|
RETVAL = new BRUnitEnabled(id); |
|
2261
|
|
|
|
|
|
|
#line 2262 "t/typemap/object/object_xsgen.cc" |
|
2262
|
|
|
|
|
|
|
{ |
|
2263
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2264
|
7
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2265
|
7
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2266
|
7
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2267
|
|
|
|
|
|
|
} |
|
2268
|
|
|
|
|
|
|
} |
|
2269
|
7
|
|
|
|
|
|
XSRETURN(1); |
|
2270
|
7
|
50
|
|
|
|
|
}); } |
|
2271
|
|
|
|
|
|
|
|
|
2272
|
|
|
|
|
|
|
|
|
2273
|
|
|
|
|
|
|
|
|
2274
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_retain) { xs::throw_guard(cv, [=]() |
|
2275
|
|
|
|
|
|
|
{ |
|
2276
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2277
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
2278
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2279
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2280
|
1
|
|
|
|
|
|
SP -= items; |
|
2281
|
|
|
|
|
|
|
{ |
|
2282
|
1
|
50
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2283
|
|
|
|
|
|
|
; |
|
2284
|
|
|
|
|
|
|
#line 77 "t/typemap/object/backref.xsi" |
|
2285
|
|
|
|
|
|
|
THIS->retain(); |
|
2286
|
|
|
|
|
|
|
#line 2287 "t/typemap/object/object_xsgen.cc" |
|
2287
|
1
|
|
|
|
|
|
PUTBACK; |
|
2288
|
1
|
|
|
|
|
|
return; |
|
2289
|
|
|
|
|
|
|
} |
|
2290
|
1
|
50
|
|
|
|
|
}); } |
|
2291
|
|
|
|
|
|
|
|
|
2292
|
|
|
|
|
|
|
|
|
2293
|
|
|
|
|
|
|
|
|
2294
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_br_addr) { xs::throw_guard(cv, [=]() |
|
2295
|
|
|
|
|
|
|
{ |
|
2296
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2297
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2298
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2299
|
|
|
|
|
|
|
{ |
|
2300
|
|
|
|
|
|
|
uint64_t RETVAL; |
|
2301
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2302
|
0
|
0
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2303
|
|
|
|
|
|
|
; |
|
2304
|
|
|
|
|
|
|
#line 80 "t/typemap/object/backref.xsi" |
|
2305
|
|
|
|
|
|
|
auto xsbr = panda::dyn_cast(THIS); |
|
2306
|
|
|
|
|
|
|
if (!xsbr) throw "no xsbr"; |
|
2307
|
|
|
|
|
|
|
RETVAL = (uint64_t)xsbr->svobj; |
|
2308
|
|
|
|
|
|
|
#line 2309 "t/typemap/object/object_xsgen.cc" |
|
2309
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHu((UV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2310
|
|
|
|
|
|
|
} |
|
2311
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2312
|
0
|
0
|
|
|
|
|
}); } |
|
2313
|
|
|
|
|
|
|
|
|
2314
|
|
|
|
|
|
|
|
|
2315
|
|
|
|
|
|
|
|
|
2316
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_rcnt_c) { xs::throw_guard(cv, [=]() |
|
2317
|
|
|
|
|
|
|
{ |
|
2318
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2319
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2320
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2321
|
|
|
|
|
|
|
{ |
|
2322
|
|
|
|
|
|
|
int RETVAL; |
|
2323
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2324
|
0
|
0
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2325
|
|
|
|
|
|
|
; |
|
2326
|
|
|
|
|
|
|
#line 86 "t/typemap/object/backref.xsi" |
|
2327
|
|
|
|
|
|
|
RETVAL = THIS->refcnt(); |
|
2328
|
|
|
|
|
|
|
#line 2329 "t/typemap/object/object_xsgen.cc" |
|
2329
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2330
|
|
|
|
|
|
|
} |
|
2331
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2332
|
0
|
0
|
|
|
|
|
}); } |
|
2333
|
|
|
|
|
|
|
|
|
2334
|
|
|
|
|
|
|
|
|
2335
|
|
|
|
|
|
|
|
|
2336
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_rcnt_sv) { xs::throw_guard(cv, [=]() |
|
2337
|
|
|
|
|
|
|
{ |
|
2338
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2339
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2340
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2341
|
|
|
|
|
|
|
{ |
|
2342
|
|
|
|
|
|
|
int RETVAL; |
|
2343
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2344
|
0
|
0
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2345
|
|
|
|
|
|
|
; |
|
2346
|
|
|
|
|
|
|
#line 90 "t/typemap/object/backref.xsi" |
|
2347
|
|
|
|
|
|
|
auto xsbr = panda::dyn_cast(THIS); |
|
2348
|
|
|
|
|
|
|
if (!xsbr) throw "no xsbr"; |
|
2349
|
|
|
|
|
|
|
//printf("xsbr=%llu\n", xsbr); |
|
2350
|
|
|
|
|
|
|
RETVAL = SvREFCNT(xsbr->svobj); |
|
2351
|
|
|
|
|
|
|
#line 2352 "t/typemap/object/object_xsgen.cc" |
|
2352
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2353
|
|
|
|
|
|
|
} |
|
2354
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2355
|
0
|
0
|
|
|
|
|
}); } |
|
2356
|
|
|
|
|
|
|
|
|
2357
|
|
|
|
|
|
|
|
|
2358
|
|
|
|
|
|
|
|
|
2359
|
20
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_id) { xs::throw_guard(cv, [=]() |
|
2360
|
|
|
|
|
|
|
{ |
|
2361
|
10
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2362
|
10
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2363
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2364
|
|
|
|
|
|
|
{ |
|
2365
|
|
|
|
|
|
|
int RETVAL; |
|
2366
|
10
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2367
|
10
|
50
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2368
|
|
|
|
|
|
|
; |
|
2369
|
|
|
|
|
|
|
SV* newval; |
|
2370
|
|
|
|
|
|
|
|
|
2371
|
10
|
50
|
|
|
|
|
if (items < 2) |
|
2372
|
10
|
|
|
|
|
|
newval = NULL; |
|
2373
|
|
|
|
|
|
|
else { |
|
2374
|
0
|
|
|
|
|
|
newval = ST(1) |
|
2375
|
0
|
|
|
|
|
|
; |
|
2376
|
|
|
|
|
|
|
} |
|
2377
|
|
|
|
|
|
|
#line 97 "t/typemap/object/backref.xsi" |
|
2378
|
|
|
|
|
|
|
if (newval) THIS->id = SvIV(newval); |
|
2379
|
|
|
|
|
|
|
RETVAL = THIS->id; |
|
2380
|
|
|
|
|
|
|
#line 2381 "t/typemap/object/object_xsgen.cc" |
|
2381
|
10
|
100
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2382
|
|
|
|
|
|
|
} |
|
2383
|
10
|
|
|
|
|
|
XSRETURN(1); |
|
2384
|
10
|
50
|
|
|
|
|
}); } |
|
2385
|
|
|
|
|
|
|
|
|
2386
|
|
|
|
|
|
|
|
|
2387
|
|
|
|
|
|
|
|
|
2388
|
22
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRUnit_DESTROY) { xs::throw_guard(cv, [=]() |
|
2389
|
|
|
|
|
|
|
{ |
|
2390
|
11
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2391
|
11
|
50
|
|
|
|
|
if (items != 1) |
|
2392
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2393
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2394
|
11
|
|
|
|
|
|
SP -= items; |
|
2395
|
|
|
|
|
|
|
{ |
|
2396
|
11
|
50
|
|
|
|
|
BRUnit* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2397
|
|
|
|
|
|
|
; |
|
2398
|
|
|
|
|
|
|
#line 102 "t/typemap/object/backref.xsi" |
|
2399
|
|
|
|
|
|
|
//printf("BRUnit::DESTROY id=%d\n", THIS->id); |
|
2400
|
|
|
|
|
|
|
dcnt.perl++; |
|
2401
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2402
|
|
|
|
|
|
|
#line 2403 "t/typemap/object/object_xsgen.cc" |
|
2403
|
11
|
|
|
|
|
|
PUTBACK; |
|
2404
|
11
|
|
|
|
|
|
return; |
|
2405
|
|
|
|
|
|
|
} |
|
2406
|
11
|
50
|
|
|
|
|
}); } |
|
2407
|
|
|
|
|
|
|
|
|
2408
|
|
|
|
|
|
|
|
|
2409
|
|
|
|
|
|
|
|
|
2410
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRStorage_new) { xs::throw_guard(cv, [=]() |
|
2411
|
|
|
|
|
|
|
{ |
|
2412
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2413
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
2414
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS"); |
|
2415
|
|
|
|
|
|
|
{ |
|
2416
|
|
|
|
|
|
|
BRStorage * RETVAL; |
|
2417
|
4
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2418
|
|
|
|
|
|
|
; |
|
2419
|
|
|
|
|
|
|
#line 110 "t/typemap/object/backref.xsi" |
|
2420
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2421
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2422
|
|
|
|
|
|
|
RETVAL = new BRStorage(); |
|
2423
|
|
|
|
|
|
|
#line 2424 "t/typemap/object/object_xsgen.cc" |
|
2424
|
|
|
|
|
|
|
{ |
|
2425
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2426
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2427
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2428
|
4
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
2429
|
|
|
|
|
|
|
} |
|
2430
|
|
|
|
|
|
|
} |
|
2431
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
2432
|
4
|
50
|
|
|
|
|
}); } |
|
2433
|
|
|
|
|
|
|
|
|
2434
|
|
|
|
|
|
|
|
|
2435
|
|
|
|
|
|
|
|
|
2436
|
42
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRStorage_unit) { xs::throw_guard(cv, [=]() |
|
2437
|
|
|
|
|
|
|
{ |
|
2438
|
21
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2439
|
21
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2440
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, unit= NULL"); |
|
2441
|
|
|
|
|
|
|
{ |
|
2442
|
|
|
|
|
|
|
BRUnit * RETVAL; |
|
2443
|
21
|
50
|
|
|
|
|
BRStorage* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2444
|
|
|
|
|
|
|
; |
|
2445
|
|
|
|
|
|
|
BRUnit* unit; |
|
2446
|
|
|
|
|
|
|
|
|
2447
|
21
|
100
|
|
|
|
|
if (items < 2) |
|
2448
|
9
|
|
|
|
|
|
unit = NULL; |
|
2449
|
|
|
|
|
|
|
else { |
|
2450
|
12
|
50
|
|
|
|
|
unit = xs::in(ST(1)); |
|
2451
|
|
|
|
|
|
|
; |
|
2452
|
|
|
|
|
|
|
} |
|
2453
|
|
|
|
|
|
|
#line 113 "t/typemap/object/backref.xsi" |
|
2454
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2455
|
|
|
|
|
|
|
if (items > 1) { |
|
2456
|
|
|
|
|
|
|
THIS->set_unit(unit); |
|
2457
|
|
|
|
|
|
|
XSRETURN_UNDEF; |
|
2458
|
|
|
|
|
|
|
} |
|
2459
|
|
|
|
|
|
|
RETVAL = THIS->get_unit(); |
|
2460
|
|
|
|
|
|
|
#line 2461 "t/typemap/object/object_xsgen.cc" |
|
2461
|
|
|
|
|
|
|
{ |
|
2462
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2463
|
9
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2464
|
9
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2465
|
21
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2466
|
|
|
|
|
|
|
} |
|
2467
|
|
|
|
|
|
|
} |
|
2468
|
21
|
|
|
|
|
|
XSRETURN(1); |
|
2469
|
21
|
50
|
|
|
|
|
}); } |
|
2470
|
|
|
|
|
|
|
|
|
2471
|
|
|
|
|
|
|
|
|
2472
|
|
|
|
|
|
|
|
|
2473
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRStorage_set_unit_with_id) { xs::throw_guard(cv, [=]() |
|
2474
|
|
|
|
|
|
|
{ |
|
2475
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2476
|
0
|
|
|
|
|
|
dXSI32; |
|
2477
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
2478
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, id"); |
|
2479
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2480
|
0
|
|
|
|
|
|
SP -= items; |
|
2481
|
|
|
|
|
|
|
{ |
|
2482
|
0
|
0
|
|
|
|
|
BRStorage* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2483
|
|
|
|
|
|
|
; |
|
2484
|
0
|
0
|
|
|
|
|
int id = (int)SvIV(ST(1)) |
|
2485
|
|
|
|
|
|
|
; |
|
2486
|
|
|
|
|
|
|
#line 121 "t/typemap/object/backref.xsi" |
|
2487
|
|
|
|
|
|
|
if (ix == 1) THIS->set_unit_with_id2(id); |
|
2488
|
|
|
|
|
|
|
else THIS->set_unit_with_id(id); |
|
2489
|
|
|
|
|
|
|
#line 2490 "t/typemap/object/object_xsgen.cc" |
|
2490
|
0
|
|
|
|
|
|
PUTBACK; |
|
2491
|
0
|
|
|
|
|
|
return; |
|
2492
|
|
|
|
|
|
|
} |
|
2493
|
0
|
0
|
|
|
|
|
}); } |
|
2494
|
|
|
|
|
|
|
|
|
2495
|
|
|
|
|
|
|
|
|
2496
|
|
|
|
|
|
|
|
|
2497
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__BRStorage_DESTROY) { xs::throw_guard(cv, [=]() |
|
2498
|
|
|
|
|
|
|
{ |
|
2499
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2500
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
2501
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2502
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2503
|
4
|
|
|
|
|
|
SP -= items; |
|
2504
|
|
|
|
|
|
|
{ |
|
2505
|
4
|
50
|
|
|
|
|
BRStorage* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2506
|
|
|
|
|
|
|
; |
|
2507
|
|
|
|
|
|
|
#line 126 "t/typemap/object/backref.xsi" |
|
2508
|
|
|
|
|
|
|
//printf("BRStorage::DESTROY\n"); |
|
2509
|
|
|
|
|
|
|
dcnt.perl++; |
|
2510
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2511
|
|
|
|
|
|
|
#line 2512 "t/typemap/object/object_xsgen.cc" |
|
2512
|
4
|
|
|
|
|
|
PUTBACK; |
|
2513
|
4
|
|
|
|
|
|
return; |
|
2514
|
|
|
|
|
|
|
} |
|
2515
|
4
|
50
|
|
|
|
|
}); } |
|
2516
|
|
|
|
|
|
|
|
|
2517
|
|
|
|
|
|
|
|
|
2518
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'backref.xsi' */ |
|
2519
|
|
|
|
|
|
|
|
|
2520
|
|
|
|
|
|
|
|
|
2521
|
|
|
|
|
|
|
/* INCLUDE: Including 'join.xsi' from 'object.xs' */ |
|
2522
|
|
|
|
|
|
|
|
|
2523
|
|
|
|
|
|
|
class MyOther { |
|
2524
|
|
|
|
|
|
|
public: |
|
2525
|
|
|
|
|
|
|
int val; |
|
2526
|
2
|
|
|
|
|
|
MyOther (int arg) : val(arg) {} |
|
2527
|
8
|
50
|
|
|
|
|
virtual ~MyOther () { dcnt.c++; } |
|
2528
|
|
|
|
|
|
|
}; |
|
2529
|
|
|
|
|
|
|
namespace xs { |
|
2530
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2531
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyOther"; } |
|
2532
|
|
|
|
|
|
|
}; |
|
2533
|
|
|
|
|
|
|
} |
|
2534
|
|
|
|
|
|
|
|
|
2535
|
|
|
|
|
|
|
|
|
2536
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyOther_new) { xs::throw_guard(cv, [=]() |
|
2537
|
|
|
|
|
|
|
{ |
|
2538
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2539
|
3
|
50
|
|
|
|
|
if (items != 3) |
|
2540
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg1, arg2"); |
|
2541
|
|
|
|
|
|
|
{ |
|
2542
|
|
|
|
|
|
|
MyOther * RETVAL; |
|
2543
|
3
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2544
|
|
|
|
|
|
|
; |
|
2545
|
3
|
50
|
|
|
|
|
int arg1 = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2546
|
|
|
|
|
|
|
; |
|
2547
|
3
|
50
|
|
|
|
|
int arg2 = (int)SvIV(ST(2)) |
|
|
|
0
|
|
|
|
|
|
|
2548
|
|
|
|
|
|
|
; |
|
2549
|
|
|
|
|
|
|
#line 24 "t/typemap/object/join.xsi" |
|
2550
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2551
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2552
|
|
|
|
|
|
|
PROTO = Sub(cv).SUPER().call(&ST(0), items); |
|
2553
|
|
|
|
|
|
|
if (!PROTO.defined()) XSRETURN_UNDEF; |
|
2554
|
|
|
|
|
|
|
RETVAL = new MyOther(arg1 + arg2); |
|
2555
|
|
|
|
|
|
|
#line 2556 "t/typemap/object/object_xsgen.cc" |
|
2556
|
|
|
|
|
|
|
{ |
|
2557
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2558
|
2
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2559
|
2
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2560
|
3
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2561
|
|
|
|
|
|
|
} |
|
2562
|
|
|
|
|
|
|
} |
|
2563
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
2564
|
3
|
50
|
|
|
|
|
}); } |
|
2565
|
|
|
|
|
|
|
|
|
2566
|
|
|
|
|
|
|
|
|
2567
|
|
|
|
|
|
|
|
|
2568
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyOther_other_val) { xs::throw_guard(cv, [=]() |
|
2569
|
|
|
|
|
|
|
{ |
|
2570
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2571
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2572
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2573
|
|
|
|
|
|
|
{ |
|
2574
|
|
|
|
|
|
|
int RETVAL; |
|
2575
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2576
|
4
|
50
|
|
|
|
|
MyOther* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2577
|
|
|
|
|
|
|
; |
|
2578
|
|
|
|
|
|
|
SV* newval; |
|
2579
|
|
|
|
|
|
|
|
|
2580
|
4
|
50
|
|
|
|
|
if (items < 2) |
|
2581
|
4
|
|
|
|
|
|
newval = NULL; |
|
2582
|
|
|
|
|
|
|
else { |
|
2583
|
0
|
|
|
|
|
|
newval = ST(1) |
|
2584
|
0
|
|
|
|
|
|
; |
|
2585
|
|
|
|
|
|
|
} |
|
2586
|
|
|
|
|
|
|
#line 30 "t/typemap/object/join.xsi" |
|
2587
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
2588
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
2589
|
|
|
|
|
|
|
#line 2590 "t/typemap/object/object_xsgen.cc" |
|
2590
|
4
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2591
|
|
|
|
|
|
|
} |
|
2592
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
2593
|
4
|
50
|
|
|
|
|
}); } |
|
2594
|
|
|
|
|
|
|
|
|
2595
|
|
|
|
|
|
|
|
|
2596
|
|
|
|
|
|
|
|
|
2597
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyOther_set_from) { xs::throw_guard(cv, [=]() |
|
2598
|
|
|
|
|
|
|
{ |
|
2599
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2600
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
2601
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2602
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2603
|
3
|
|
|
|
|
|
SP -= items; |
|
2604
|
|
|
|
|
|
|
{ |
|
2605
|
3
|
50
|
|
|
|
|
MyOther* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2606
|
|
|
|
|
|
|
; |
|
2607
|
3
|
100
|
|
|
|
|
MyOther* other = xs::in(ST(1)); |
|
2608
|
|
|
|
|
|
|
; |
|
2609
|
|
|
|
|
|
|
#line 35 "t/typemap/object/join.xsi" |
|
2610
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
2611
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
2612
|
|
|
|
|
|
|
#line 2613 "t/typemap/object/object_xsgen.cc" |
|
2613
|
2
|
|
|
|
|
|
PUTBACK; |
|
2614
|
2
|
|
|
|
|
|
return; |
|
2615
|
|
|
|
|
|
|
} |
|
2616
|
3
|
50
|
|
|
|
|
}); } |
|
2617
|
|
|
|
|
|
|
|
|
2618
|
|
|
|
|
|
|
|
|
2619
|
|
|
|
|
|
|
|
|
2620
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyOther_DESTROY) { xs::throw_guard(cv, [=]() |
|
2621
|
|
|
|
|
|
|
{ |
|
2622
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2623
|
2
|
50
|
|
|
|
|
if (items != 1) |
|
2624
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2625
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2626
|
2
|
|
|
|
|
|
SP -= items; |
|
2627
|
|
|
|
|
|
|
{ |
|
2628
|
2
|
50
|
|
|
|
|
MyOther* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2629
|
|
|
|
|
|
|
; |
|
2630
|
|
|
|
|
|
|
#line 40 "t/typemap/object/join.xsi" |
|
2631
|
|
|
|
|
|
|
dcnt.perl++; |
|
2632
|
|
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
2633
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2634
|
|
|
|
|
|
|
#line 2635 "t/typemap/object/object_xsgen.cc" |
|
2635
|
2
|
|
|
|
|
|
PUTBACK; |
|
2636
|
2
|
|
|
|
|
|
return; |
|
2637
|
|
|
|
|
|
|
} |
|
2638
|
2
|
50
|
|
|
|
|
}); } |
|
2639
|
|
|
|
|
|
|
|
|
2640
|
|
|
|
|
|
|
|
|
2641
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'join.xsi' */ |
|
2642
|
|
|
|
|
|
|
|
|
2643
|
|
|
|
|
|
|
|
|
2644
|
|
|
|
|
|
|
/* INCLUDE: Including 'mixin.xsi' from 'object.xs' */ |
|
2645
|
|
|
|
|
|
|
|
|
2646
|
|
|
|
|
|
|
class MixBase { |
|
2647
|
|
|
|
|
|
|
public: |
|
2648
|
|
|
|
|
|
|
int val; |
|
2649
|
4
|
|
|
|
|
|
MixBase (int arg) : val(arg) {} |
|
2650
|
16
|
50
|
|
|
|
|
virtual ~MixBase () { dcnt.c++; } |
|
2651
|
|
|
|
|
|
|
}; |
|
2652
|
|
|
|
|
|
|
class MixPluginA { |
|
2653
|
|
|
|
|
|
|
public: |
|
2654
|
|
|
|
|
|
|
int val; |
|
2655
|
3
|
|
|
|
|
|
MixPluginA () : val(0) {} |
|
2656
|
12
|
50
|
|
|
|
|
virtual ~MixPluginA () { dcnt.c++; } |
|
2657
|
|
|
|
|
|
|
}; |
|
2658
|
|
|
|
|
|
|
class MixPluginB { |
|
2659
|
|
|
|
|
|
|
public: |
|
2660
|
|
|
|
|
|
|
int val; |
|
2661
|
4
|
|
|
|
|
|
MixPluginB () : val(0) {} |
|
2662
|
16
|
50
|
|
|
|
|
virtual ~MixPluginB () { dcnt.c++; } |
|
2663
|
|
|
|
|
|
|
}; |
|
2664
|
|
|
|
|
|
|
namespace xs { |
|
2665
|
|
|
|
|
|
|
|
|
2666
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2667
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MixBase"; } |
|
2668
|
|
|
|
|
|
|
}; |
|
2669
|
|
|
|
|
|
|
|
|
2670
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2671
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MixPluginA"; } |
|
2672
|
|
|
|
|
|
|
}; |
|
2673
|
|
|
|
|
|
|
|
|
2674
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
2675
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MixPluginB"; } |
|
2676
|
|
|
|
|
|
|
}; |
|
2677
|
|
|
|
|
|
|
} |
|
2678
|
|
|
|
|
|
|
|
|
2679
|
|
|
|
|
|
|
|
|
2680
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixBase_new) { xs::throw_guard(cv, [=]() |
|
2681
|
|
|
|
|
|
|
{ |
|
2682
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2683
|
5
|
50
|
|
|
|
|
if (items != 2) |
|
2684
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
2685
|
|
|
|
|
|
|
{ |
|
2686
|
|
|
|
|
|
|
MixBase * RETVAL; |
|
2687
|
5
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2688
|
|
|
|
|
|
|
; |
|
2689
|
5
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
2690
|
|
|
|
|
|
|
; |
|
2691
|
|
|
|
|
|
|
#line 44 "t/typemap/object/mixin.xsi" |
|
2692
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2693
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2694
|
|
|
|
|
|
|
if (!arg) XSRETURN_UNDEF; |
|
2695
|
|
|
|
|
|
|
RETVAL = new MixBase(arg); |
|
2696
|
|
|
|
|
|
|
#line 2697 "t/typemap/object/object_xsgen.cc" |
|
2697
|
|
|
|
|
|
|
{ |
|
2698
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2699
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2700
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2701
|
5
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2702
|
|
|
|
|
|
|
} |
|
2703
|
|
|
|
|
|
|
} |
|
2704
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
2705
|
5
|
50
|
|
|
|
|
}); } |
|
2706
|
|
|
|
|
|
|
|
|
2707
|
|
|
|
|
|
|
|
|
2708
|
|
|
|
|
|
|
|
|
2709
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixBase_val) { xs::throw_guard(cv, [=]() |
|
2710
|
|
|
|
|
|
|
{ |
|
2711
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2712
|
5
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2713
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2714
|
|
|
|
|
|
|
{ |
|
2715
|
|
|
|
|
|
|
int RETVAL; |
|
2716
|
5
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2717
|
5
|
50
|
|
|
|
|
MixBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2718
|
|
|
|
|
|
|
; |
|
2719
|
|
|
|
|
|
|
SV* newval; |
|
2720
|
|
|
|
|
|
|
|
|
2721
|
5
|
100
|
|
|
|
|
if (items < 2) |
|
2722
|
4
|
|
|
|
|
|
newval = NULL; |
|
2723
|
|
|
|
|
|
|
else { |
|
2724
|
1
|
|
|
|
|
|
newval = ST(1) |
|
2725
|
1
|
|
|
|
|
|
; |
|
2726
|
|
|
|
|
|
|
} |
|
2727
|
|
|
|
|
|
|
#line 49 "t/typemap/object/mixin.xsi" |
|
2728
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
2729
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
2730
|
|
|
|
|
|
|
#line 2731 "t/typemap/object/object_xsgen.cc" |
|
2731
|
5
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2732
|
|
|
|
|
|
|
} |
|
2733
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
2734
|
5
|
50
|
|
|
|
|
}); } |
|
2735
|
|
|
|
|
|
|
|
|
2736
|
|
|
|
|
|
|
|
|
2737
|
|
|
|
|
|
|
|
|
2738
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixBase_set_from) { xs::throw_guard(cv, [=]() |
|
2739
|
|
|
|
|
|
|
{ |
|
2740
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2741
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
2742
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2743
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2744
|
2
|
|
|
|
|
|
SP -= items; |
|
2745
|
|
|
|
|
|
|
{ |
|
2746
|
2
|
50
|
|
|
|
|
MixBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2747
|
|
|
|
|
|
|
; |
|
2748
|
2
|
|
|
|
|
|
MixBase* other = xs::in(ST(1)); |
|
2749
|
|
|
|
|
|
|
; |
|
2750
|
|
|
|
|
|
|
#line 54 "t/typemap/object/mixin.xsi" |
|
2751
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
2752
|
|
|
|
|
|
|
#line 2753 "t/typemap/object/object_xsgen.cc" |
|
2753
|
2
|
|
|
|
|
|
PUTBACK; |
|
2754
|
2
|
|
|
|
|
|
return; |
|
2755
|
|
|
|
|
|
|
} |
|
2756
|
2
|
50
|
|
|
|
|
}); } |
|
2757
|
|
|
|
|
|
|
|
|
2758
|
|
|
|
|
|
|
|
|
2759
|
|
|
|
|
|
|
|
|
2760
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixBase_DESTROY) { xs::throw_guard(cv, [=]() |
|
2761
|
|
|
|
|
|
|
{ |
|
2762
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2763
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
2764
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2765
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2766
|
4
|
|
|
|
|
|
SP -= items; |
|
2767
|
|
|
|
|
|
|
{ |
|
2768
|
4
|
50
|
|
|
|
|
MixBase* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2769
|
|
|
|
|
|
|
; |
|
2770
|
|
|
|
|
|
|
#line 58 "t/typemap/object/mixin.xsi" |
|
2771
|
|
|
|
|
|
|
dcnt.perl++; |
|
2772
|
|
|
|
|
|
|
Object(ST(0)).call_next_maybe(cv, &ST(1), items-1); |
|
2773
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2774
|
|
|
|
|
|
|
#line 2775 "t/typemap/object/object_xsgen.cc" |
|
2775
|
4
|
|
|
|
|
|
PUTBACK; |
|
2776
|
4
|
|
|
|
|
|
return; |
|
2777
|
|
|
|
|
|
|
} |
|
2778
|
4
|
50
|
|
|
|
|
}); } |
|
2779
|
|
|
|
|
|
|
|
|
2780
|
|
|
|
|
|
|
|
|
2781
|
|
|
|
|
|
|
|
|
2782
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixBase_CLONE_SKIP) { xs::throw_guard(cv, [=]() |
|
2783
|
|
|
|
|
|
|
{ |
|
2784
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2785
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
2786
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*"); |
|
2787
|
|
|
|
|
|
|
{ |
|
2788
|
|
|
|
|
|
|
int RETVAL; |
|
2789
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2790
|
|
|
|
|
|
|
#line 62 "t/typemap/object/mixin.xsi" |
|
2791
|
|
|
|
|
|
|
RETVAL = 1; |
|
2792
|
|
|
|
|
|
|
#line 2793 "t/typemap/object/object_xsgen.cc" |
|
2793
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
2794
|
|
|
|
|
|
|
} |
|
2795
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
2796
|
0
|
0
|
|
|
|
|
}); } |
|
2797
|
|
|
|
|
|
|
|
|
2798
|
|
|
|
|
|
|
|
|
2799
|
|
|
|
|
|
|
|
|
2800
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginA_new) { xs::throw_guard(cv, [=]() |
|
2801
|
|
|
|
|
|
|
{ |
|
2802
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2803
|
4
|
50
|
|
|
|
|
if (items < 1) |
|
2804
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, ..."); |
|
2805
|
|
|
|
|
|
|
{ |
|
2806
|
|
|
|
|
|
|
MixPluginA * RETVAL; |
|
2807
|
4
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2808
|
|
|
|
|
|
|
; |
|
2809
|
|
|
|
|
|
|
#line 69 "t/typemap/object/mixin.xsi" |
|
2810
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2811
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2812
|
|
|
|
|
|
|
PROTO = Stash::from_name(CLASS).call_next(cv, &ST(1), items-1); |
|
2813
|
|
|
|
|
|
|
if (!PROTO.defined()) XSRETURN_UNDEF; |
|
2814
|
|
|
|
|
|
|
RETVAL = new MixPluginA(); |
|
2815
|
|
|
|
|
|
|
#line 2816 "t/typemap/object/object_xsgen.cc" |
|
2816
|
|
|
|
|
|
|
{ |
|
2817
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2818
|
3
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2819
|
3
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2820
|
4
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2821
|
|
|
|
|
|
|
} |
|
2822
|
|
|
|
|
|
|
} |
|
2823
|
4
|
|
|
|
|
|
XSRETURN(1); |
|
2824
|
4
|
50
|
|
|
|
|
}); } |
|
2825
|
|
|
|
|
|
|
|
|
2826
|
|
|
|
|
|
|
|
|
2827
|
|
|
|
|
|
|
|
|
2828
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginA_val_a) { xs::throw_guard(cv, [=]() |
|
2829
|
|
|
|
|
|
|
{ |
|
2830
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2831
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2832
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2833
|
|
|
|
|
|
|
{ |
|
2834
|
|
|
|
|
|
|
int RETVAL; |
|
2835
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2836
|
6
|
50
|
|
|
|
|
MixPluginA* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2837
|
|
|
|
|
|
|
; |
|
2838
|
|
|
|
|
|
|
SV* newval; |
|
2839
|
|
|
|
|
|
|
|
|
2840
|
6
|
100
|
|
|
|
|
if (items < 2) |
|
2841
|
4
|
|
|
|
|
|
newval = NULL; |
|
2842
|
|
|
|
|
|
|
else { |
|
2843
|
2
|
|
|
|
|
|
newval = ST(1) |
|
2844
|
2
|
|
|
|
|
|
; |
|
2845
|
|
|
|
|
|
|
} |
|
2846
|
|
|
|
|
|
|
#line 75 "t/typemap/object/mixin.xsi" |
|
2847
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
2848
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
2849
|
|
|
|
|
|
|
#line 2850 "t/typemap/object/object_xsgen.cc" |
|
2850
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2851
|
|
|
|
|
|
|
} |
|
2852
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
2853
|
6
|
50
|
|
|
|
|
}); } |
|
2854
|
|
|
|
|
|
|
|
|
2855
|
|
|
|
|
|
|
|
|
2856
|
|
|
|
|
|
|
|
|
2857
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginA_set_from) { xs::throw_guard(cv, [=]() |
|
2858
|
|
|
|
|
|
|
{ |
|
2859
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2860
|
3
|
50
|
|
|
|
|
if (items != 2) |
|
2861
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2862
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2863
|
3
|
|
|
|
|
|
SP -= items; |
|
2864
|
|
|
|
|
|
|
{ |
|
2865
|
3
|
50
|
|
|
|
|
MixPluginA* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2866
|
|
|
|
|
|
|
; |
|
2867
|
3
|
|
|
|
|
|
MixPluginA* other = xs::in(ST(1)); |
|
2868
|
|
|
|
|
|
|
; |
|
2869
|
|
|
|
|
|
|
#line 80 "t/typemap/object/mixin.xsi" |
|
2870
|
|
|
|
|
|
|
Object(ST(0)).call_next(cv, &ST(1), items-1); |
|
2871
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
2872
|
|
|
|
|
|
|
#line 2873 "t/typemap/object/object_xsgen.cc" |
|
2873
|
2
|
|
|
|
|
|
PUTBACK; |
|
2874
|
2
|
|
|
|
|
|
return; |
|
2875
|
|
|
|
|
|
|
} |
|
2876
|
3
|
50
|
|
|
|
|
}); } |
|
2877
|
|
|
|
|
|
|
|
|
2878
|
|
|
|
|
|
|
|
|
2879
|
|
|
|
|
|
|
|
|
2880
|
6
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginA_DESTROY) { xs::throw_guard(cv, [=]() |
|
2881
|
|
|
|
|
|
|
{ |
|
2882
|
3
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2883
|
3
|
50
|
|
|
|
|
if (items != 1) |
|
2884
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2885
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2886
|
3
|
|
|
|
|
|
SP -= items; |
|
2887
|
|
|
|
|
|
|
{ |
|
2888
|
3
|
50
|
|
|
|
|
MixPluginA* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2889
|
|
|
|
|
|
|
; |
|
2890
|
|
|
|
|
|
|
#line 85 "t/typemap/object/mixin.xsi" |
|
2891
|
|
|
|
|
|
|
dcnt.perl++; |
|
2892
|
|
|
|
|
|
|
Object(ST(0)).call_next(cv, &ST(1), items-1); |
|
2893
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2894
|
|
|
|
|
|
|
#line 2895 "t/typemap/object/object_xsgen.cc" |
|
2895
|
3
|
|
|
|
|
|
PUTBACK; |
|
2896
|
3
|
|
|
|
|
|
return; |
|
2897
|
|
|
|
|
|
|
} |
|
2898
|
3
|
50
|
|
|
|
|
}); } |
|
2899
|
|
|
|
|
|
|
|
|
2900
|
|
|
|
|
|
|
|
|
2901
|
|
|
|
|
|
|
|
|
2902
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginB_new) { xs::throw_guard(cv, [=]() |
|
2903
|
|
|
|
|
|
|
{ |
|
2904
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2905
|
5
|
50
|
|
|
|
|
if (items < 1) |
|
2906
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, ..."); |
|
2907
|
|
|
|
|
|
|
{ |
|
2908
|
|
|
|
|
|
|
MixPluginB * RETVAL; |
|
2909
|
5
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
2910
|
|
|
|
|
|
|
; |
|
2911
|
|
|
|
|
|
|
#line 95 "t/typemap/object/mixin.xsi" |
|
2912
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
2913
|
|
|
|
|
|
|
PROTO = CLASS; |
|
2914
|
|
|
|
|
|
|
PROTO = Stash::from_name(CLASS).call_next(cv, &ST(1), items-1); |
|
2915
|
|
|
|
|
|
|
if (!PROTO.defined()) XSRETURN_UNDEF; |
|
2916
|
|
|
|
|
|
|
RETVAL = new MixPluginB(); |
|
2917
|
|
|
|
|
|
|
#line 2918 "t/typemap/object/object_xsgen.cc" |
|
2918
|
|
|
|
|
|
|
{ |
|
2919
|
|
|
|
|
|
|
SV * RETVALSV; |
|
2920
|
4
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
2921
|
4
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
2922
|
5
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
2923
|
|
|
|
|
|
|
} |
|
2924
|
|
|
|
|
|
|
} |
|
2925
|
5
|
|
|
|
|
|
XSRETURN(1); |
|
2926
|
5
|
50
|
|
|
|
|
}); } |
|
2927
|
|
|
|
|
|
|
|
|
2928
|
|
|
|
|
|
|
|
|
2929
|
|
|
|
|
|
|
|
|
2930
|
12
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginB_val_b) { xs::throw_guard(cv, [=]() |
|
2931
|
|
|
|
|
|
|
{ |
|
2932
|
6
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2933
|
6
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
2934
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
2935
|
|
|
|
|
|
|
{ |
|
2936
|
|
|
|
|
|
|
int RETVAL; |
|
2937
|
6
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
2938
|
6
|
50
|
|
|
|
|
MixPluginB* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2939
|
|
|
|
|
|
|
; |
|
2940
|
|
|
|
|
|
|
SV* newval; |
|
2941
|
|
|
|
|
|
|
|
|
2942
|
6
|
100
|
|
|
|
|
if (items < 2) |
|
2943
|
4
|
|
|
|
|
|
newval = NULL; |
|
2944
|
|
|
|
|
|
|
else { |
|
2945
|
2
|
|
|
|
|
|
newval = ST(1) |
|
2946
|
2
|
|
|
|
|
|
; |
|
2947
|
|
|
|
|
|
|
} |
|
2948
|
|
|
|
|
|
|
#line 101 "t/typemap/object/mixin.xsi" |
|
2949
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
2950
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
2951
|
|
|
|
|
|
|
#line 2952 "t/typemap/object/object_xsgen.cc" |
|
2952
|
6
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
2953
|
|
|
|
|
|
|
} |
|
2954
|
6
|
|
|
|
|
|
XSRETURN(1); |
|
2955
|
6
|
50
|
|
|
|
|
}); } |
|
2956
|
|
|
|
|
|
|
|
|
2957
|
|
|
|
|
|
|
|
|
2958
|
|
|
|
|
|
|
|
|
2959
|
10
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginB_set_from) { xs::throw_guard(cv, [=]() |
|
2960
|
|
|
|
|
|
|
{ |
|
2961
|
5
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2962
|
5
|
50
|
|
|
|
|
if (items != 2) |
|
2963
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, other"); |
|
2964
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2965
|
5
|
|
|
|
|
|
SP -= items; |
|
2966
|
|
|
|
|
|
|
{ |
|
2967
|
5
|
50
|
|
|
|
|
MixPluginB* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2968
|
|
|
|
|
|
|
; |
|
2969
|
5
|
|
|
|
|
|
MixPluginB* other = xs::in(ST(1)); |
|
2970
|
|
|
|
|
|
|
; |
|
2971
|
|
|
|
|
|
|
#line 106 "t/typemap/object/mixin.xsi" |
|
2972
|
|
|
|
|
|
|
Object(ST(0)).call_next(cv, &ST(1), items-1); |
|
2973
|
|
|
|
|
|
|
if (other) THIS->val = other->val; |
|
2974
|
|
|
|
|
|
|
#line 2975 "t/typemap/object/object_xsgen.cc" |
|
2975
|
2
|
|
|
|
|
|
PUTBACK; |
|
2976
|
2
|
|
|
|
|
|
return; |
|
2977
|
|
|
|
|
|
|
} |
|
2978
|
5
|
50
|
|
|
|
|
}); } |
|
2979
|
|
|
|
|
|
|
|
|
2980
|
|
|
|
|
|
|
|
|
2981
|
|
|
|
|
|
|
|
|
2982
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MixPluginB_DESTROY) { xs::throw_guard(cv, [=]() |
|
2983
|
|
|
|
|
|
|
{ |
|
2984
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
2985
|
4
|
50
|
|
|
|
|
if (items != 1) |
|
2986
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
2987
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
2988
|
4
|
|
|
|
|
|
SP -= items; |
|
2989
|
|
|
|
|
|
|
{ |
|
2990
|
4
|
50
|
|
|
|
|
MixPluginB* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2991
|
|
|
|
|
|
|
; |
|
2992
|
|
|
|
|
|
|
#line 111 "t/typemap/object/mixin.xsi" |
|
2993
|
|
|
|
|
|
|
dcnt.perl++; |
|
2994
|
|
|
|
|
|
|
Object(ST(0)).call_next(cv, &ST(1), items-1); |
|
2995
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
2996
|
|
|
|
|
|
|
#line 2997 "t/typemap/object/object_xsgen.cc" |
|
2997
|
4
|
|
|
|
|
|
PUTBACK; |
|
2998
|
4
|
|
|
|
|
|
return; |
|
2999
|
|
|
|
|
|
|
} |
|
3000
|
4
|
50
|
|
|
|
|
}); } |
|
3001
|
|
|
|
|
|
|
|
|
3002
|
|
|
|
|
|
|
|
|
3003
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'mixin.xsi' */ |
|
3004
|
|
|
|
|
|
|
|
|
3005
|
|
|
|
|
|
|
|
|
3006
|
|
|
|
|
|
|
/* INCLUDE: Including 'avhv.xsi' from 'object.xs' */ |
|
3007
|
|
|
|
|
|
|
|
|
3008
|
|
|
|
|
|
|
using MyBaseAV = _MyBase<2>; |
|
3009
|
|
|
|
|
|
|
using MyBaseHV = _MyBase<3>; |
|
3010
|
|
|
|
|
|
|
namespace xs { |
|
3011
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3012
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyBaseAV"; } |
|
3013
|
|
|
|
|
|
|
}; |
|
3014
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3015
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyBaseHV"; } |
|
3016
|
|
|
|
|
|
|
}; |
|
3017
|
|
|
|
|
|
|
} |
|
3018
|
|
|
|
|
|
|
|
|
3019
|
|
|
|
|
|
|
|
|
3020
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseAV_new) { xs::throw_guard(cv, [=]() |
|
3021
|
|
|
|
|
|
|
{ |
|
3022
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3023
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
3024
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
3025
|
|
|
|
|
|
|
{ |
|
3026
|
|
|
|
|
|
|
MyBaseAV * RETVAL; |
|
3027
|
2
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
3028
|
|
|
|
|
|
|
; |
|
3029
|
|
|
|
|
|
|
#line 19 "t/typemap/object/avhv.xsi" |
|
3030
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3031
|
|
|
|
|
|
|
if (!arg) XSRETURN_UNDEF; |
|
3032
|
|
|
|
|
|
|
RETVAL = new MyBaseAV(arg); |
|
3033
|
|
|
|
|
|
|
PROTO = Array::create(); |
|
3034
|
|
|
|
|
|
|
#line 3035 "t/typemap/object/object_xsgen.cc" |
|
3035
|
|
|
|
|
|
|
{ |
|
3036
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3037
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3038
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3039
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
3040
|
|
|
|
|
|
|
} |
|
3041
|
|
|
|
|
|
|
} |
|
3042
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
3043
|
2
|
50
|
|
|
|
|
}); } |
|
3044
|
|
|
|
|
|
|
|
|
3045
|
|
|
|
|
|
|
|
|
3046
|
|
|
|
|
|
|
|
|
3047
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseAV_val) { xs::throw_guard(cv, [=]() |
|
3048
|
|
|
|
|
|
|
{ |
|
3049
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3050
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3051
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3052
|
|
|
|
|
|
|
{ |
|
3053
|
|
|
|
|
|
|
int RETVAL; |
|
3054
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3055
|
1
|
50
|
|
|
|
|
MyBaseAV* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3056
|
|
|
|
|
|
|
; |
|
3057
|
|
|
|
|
|
|
#line 25 "t/typemap/object/avhv.xsi" |
|
3058
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
3059
|
|
|
|
|
|
|
#line 3060 "t/typemap/object/object_xsgen.cc" |
|
3060
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3061
|
|
|
|
|
|
|
} |
|
3062
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3063
|
1
|
50
|
|
|
|
|
}); } |
|
3064
|
|
|
|
|
|
|
|
|
3065
|
|
|
|
|
|
|
|
|
3066
|
|
|
|
|
|
|
|
|
3067
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseAV_DESTROY) { xs::throw_guard(cv, [=]() |
|
3068
|
|
|
|
|
|
|
{ |
|
3069
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3070
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3071
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3072
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
3073
|
1
|
|
|
|
|
|
SP -= items; |
|
3074
|
|
|
|
|
|
|
{ |
|
3075
|
1
|
50
|
|
|
|
|
MyBaseAV* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3076
|
|
|
|
|
|
|
; |
|
3077
|
|
|
|
|
|
|
#line 29 "t/typemap/object/avhv.xsi" |
|
3078
|
|
|
|
|
|
|
dcnt.perl++; |
|
3079
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
3080
|
|
|
|
|
|
|
#line 3081 "t/typemap/object/object_xsgen.cc" |
|
3081
|
1
|
|
|
|
|
|
PUTBACK; |
|
3082
|
1
|
|
|
|
|
|
return; |
|
3083
|
|
|
|
|
|
|
} |
|
3084
|
1
|
50
|
|
|
|
|
}); } |
|
3085
|
|
|
|
|
|
|
|
|
3086
|
|
|
|
|
|
|
|
|
3087
|
|
|
|
|
|
|
|
|
3088
|
4
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseHV_new) { xs::throw_guard(cv, [=]() |
|
3089
|
|
|
|
|
|
|
{ |
|
3090
|
2
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3091
|
2
|
50
|
|
|
|
|
if (items != 2) |
|
3092
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*, arg"); |
|
3093
|
|
|
|
|
|
|
{ |
|
3094
|
|
|
|
|
|
|
MyBaseHV * RETVAL; |
|
3095
|
2
|
50
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
3096
|
|
|
|
|
|
|
; |
|
3097
|
|
|
|
|
|
|
#line 36 "t/typemap/object/avhv.xsi" |
|
3098
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3099
|
|
|
|
|
|
|
if (!arg) XSRETURN_UNDEF; |
|
3100
|
|
|
|
|
|
|
RETVAL = new MyBaseHV(arg); |
|
3101
|
|
|
|
|
|
|
PROTO = Hash::create(); |
|
3102
|
|
|
|
|
|
|
#line 3103 "t/typemap/object/object_xsgen.cc" |
|
3103
|
|
|
|
|
|
|
{ |
|
3104
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3105
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3106
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3107
|
2
|
100
|
|
|
|
|
ST(0) = RETVALSV; |
|
3108
|
|
|
|
|
|
|
} |
|
3109
|
|
|
|
|
|
|
} |
|
3110
|
2
|
|
|
|
|
|
XSRETURN(1); |
|
3111
|
2
|
50
|
|
|
|
|
}); } |
|
3112
|
|
|
|
|
|
|
|
|
3113
|
|
|
|
|
|
|
|
|
3114
|
|
|
|
|
|
|
|
|
3115
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseHV_val) { xs::throw_guard(cv, [=]() |
|
3116
|
|
|
|
|
|
|
{ |
|
3117
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3118
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3119
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3120
|
|
|
|
|
|
|
{ |
|
3121
|
|
|
|
|
|
|
int RETVAL; |
|
3122
|
1
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3123
|
1
|
50
|
|
|
|
|
MyBaseHV* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3124
|
|
|
|
|
|
|
; |
|
3125
|
|
|
|
|
|
|
#line 42 "t/typemap/object/avhv.xsi" |
|
3126
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
3127
|
|
|
|
|
|
|
#line 3128 "t/typemap/object/object_xsgen.cc" |
|
3128
|
1
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3129
|
|
|
|
|
|
|
} |
|
3130
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3131
|
1
|
50
|
|
|
|
|
}); } |
|
3132
|
|
|
|
|
|
|
|
|
3133
|
|
|
|
|
|
|
|
|
3134
|
|
|
|
|
|
|
|
|
3135
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyBaseHV_DESTROY) { xs::throw_guard(cv, [=]() |
|
3136
|
|
|
|
|
|
|
{ |
|
3137
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3138
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3139
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3140
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
3141
|
1
|
|
|
|
|
|
SP -= items; |
|
3142
|
|
|
|
|
|
|
{ |
|
3143
|
1
|
50
|
|
|
|
|
MyBaseHV* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3144
|
|
|
|
|
|
|
; |
|
3145
|
|
|
|
|
|
|
#line 46 "t/typemap/object/avhv.xsi" |
|
3146
|
|
|
|
|
|
|
dcnt.perl++; |
|
3147
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
3148
|
|
|
|
|
|
|
#line 3149 "t/typemap/object/object_xsgen.cc" |
|
3149
|
1
|
|
|
|
|
|
PUTBACK; |
|
3150
|
1
|
|
|
|
|
|
return; |
|
3151
|
|
|
|
|
|
|
} |
|
3152
|
1
|
50
|
|
|
|
|
}); } |
|
3153
|
|
|
|
|
|
|
|
|
3154
|
|
|
|
|
|
|
|
|
3155
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'avhv.xsi' */ |
|
3156
|
|
|
|
|
|
|
|
|
3157
|
|
|
|
|
|
|
|
|
3158
|
|
|
|
|
|
|
/* INCLUDE: Including 'threads.xsi' from 'object.xs' */ |
|
3159
|
|
|
|
|
|
|
|
|
3160
|
|
|
|
|
|
|
class MyThreadSafe : public virtual panda::Refcnt { |
|
3161
|
|
|
|
|
|
|
public: |
|
3162
|
|
|
|
|
|
|
int val; |
|
3163
|
0
|
|
|
|
|
|
MyThreadSafe (int arg) : val(arg) {} |
|
3164
|
0
|
0
|
|
|
|
|
virtual ~MyThreadSafe () { dcnt.c++; } |
|
|
|
0
|
|
|
|
|
|
|
3165
|
|
|
|
|
|
|
}; |
|
3166
|
|
|
|
|
|
|
namespace xs { |
|
3167
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3168
|
0
|
0
|
|
|
|
|
static std::string package () { return "MyTest::MyThreadSafe"; } |
|
3169
|
|
|
|
|
|
|
static MyThreadSafe* dup (MyThreadSafe* obj) { return obj; } |
|
3170
|
|
|
|
|
|
|
}; |
|
3171
|
|
|
|
|
|
|
} |
|
3172
|
|
|
|
|
|
|
|
|
3173
|
|
|
|
|
|
|
|
|
3174
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyThreadSafe_new) { xs::throw_guard(cv, [=]() |
|
3175
|
|
|
|
|
|
|
{ |
|
3176
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3177
|
0
|
0
|
|
|
|
|
if (items != 2) |
|
3178
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS, arg"); |
|
3179
|
|
|
|
|
|
|
{ |
|
3180
|
|
|
|
|
|
|
MyThreadSafe * RETVAL; |
|
3181
|
0
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
3182
|
|
|
|
|
|
|
; |
|
3183
|
0
|
0
|
|
|
|
|
int arg = (int)SvIV(ST(1)) |
|
|
|
0
|
|
|
|
|
|
|
3184
|
|
|
|
|
|
|
; |
|
3185
|
|
|
|
|
|
|
#line 21 "t/typemap/object/threads.xsi" |
|
3186
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3187
|
|
|
|
|
|
|
PROTO = CLASS; |
|
3188
|
|
|
|
|
|
|
RETVAL = new MyThreadSafe(arg); |
|
3189
|
|
|
|
|
|
|
#line 3190 "t/typemap/object/object_xsgen.cc" |
|
3190
|
|
|
|
|
|
|
{ |
|
3191
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3192
|
0
|
0
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3193
|
0
|
0
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3194
|
0
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3195
|
|
|
|
|
|
|
} |
|
3196
|
|
|
|
|
|
|
} |
|
3197
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3198
|
0
|
0
|
|
|
|
|
}); } |
|
3199
|
|
|
|
|
|
|
|
|
3200
|
|
|
|
|
|
|
|
|
3201
|
|
|
|
|
|
|
|
|
3202
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyThreadSafe_val) { xs::throw_guard(cv, [=]() |
|
3203
|
|
|
|
|
|
|
{ |
|
3204
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3205
|
0
|
0
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
0
|
|
|
|
|
|
|
3206
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
3207
|
|
|
|
|
|
|
{ |
|
3208
|
|
|
|
|
|
|
int RETVAL; |
|
3209
|
0
|
0
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3210
|
0
|
0
|
|
|
|
|
MyThreadSafe* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3211
|
|
|
|
|
|
|
; |
|
3212
|
|
|
|
|
|
|
SV* newval; |
|
3213
|
|
|
|
|
|
|
|
|
3214
|
0
|
0
|
|
|
|
|
if (items < 2) |
|
3215
|
0
|
|
|
|
|
|
newval = NULL; |
|
3216
|
|
|
|
|
|
|
else { |
|
3217
|
0
|
|
|
|
|
|
newval = ST(1) |
|
3218
|
0
|
|
|
|
|
|
; |
|
3219
|
|
|
|
|
|
|
} |
|
3220
|
|
|
|
|
|
|
#line 24 "t/typemap/object/threads.xsi" |
|
3221
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
3222
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
3223
|
|
|
|
|
|
|
#line 3224 "t/typemap/object/object_xsgen.cc" |
|
3224
|
0
|
0
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
0
|
|
|
|
|
|
|
3225
|
|
|
|
|
|
|
} |
|
3226
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3227
|
0
|
0
|
|
|
|
|
}); } |
|
3228
|
|
|
|
|
|
|
|
|
3229
|
|
|
|
|
|
|
|
|
3230
|
|
|
|
|
|
|
|
|
3231
|
0
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyThreadSafe_DESTROY) { xs::throw_guard(cv, [=]() |
|
3232
|
|
|
|
|
|
|
{ |
|
3233
|
0
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3234
|
0
|
0
|
|
|
|
|
if (items != 1) |
|
3235
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3236
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
3237
|
0
|
|
|
|
|
|
SP -= items; |
|
3238
|
|
|
|
|
|
|
{ |
|
3239
|
0
|
0
|
|
|
|
|
MyThreadSafe* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3240
|
|
|
|
|
|
|
; |
|
3241
|
|
|
|
|
|
|
#line 29 "t/typemap/object/threads.xsi" |
|
3242
|
|
|
|
|
|
|
dcnt.perl++; |
|
3243
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
3244
|
|
|
|
|
|
|
#line 3245 "t/typemap/object/object_xsgen.cc" |
|
3245
|
0
|
|
|
|
|
|
PUTBACK; |
|
3246
|
0
|
|
|
|
|
|
return; |
|
3247
|
|
|
|
|
|
|
} |
|
3248
|
0
|
0
|
|
|
|
|
}); } |
|
3249
|
|
|
|
|
|
|
|
|
3250
|
|
|
|
|
|
|
|
|
3251
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'threads.xsi' */ |
|
3252
|
|
|
|
|
|
|
|
|
3253
|
|
|
|
|
|
|
|
|
3254
|
|
|
|
|
|
|
/* INCLUDE: Including 'foreign.xsi' from 'object.xs' */ |
|
3255
|
|
|
|
|
|
|
|
|
3256
|
|
|
|
|
|
|
struct MyForeign { |
|
3257
|
|
|
|
|
|
|
int val; |
|
3258
|
34
|
|
|
|
|
|
MyForeign (int arg) : val(arg) {} |
|
3259
|
68
|
50
|
|
|
|
|
virtual ~MyForeign () { dcnt.c++; } |
|
3260
|
|
|
|
|
|
|
}; |
|
3261
|
34
|
|
|
|
|
|
static MyForeign _myforeign(789); |
|
3262
|
|
|
|
|
|
|
namespace xs { |
|
3263
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3264
|
2
|
50
|
|
|
|
|
static std::string package () { return "MyTest::MyForeign"; } |
|
3265
|
|
|
|
|
|
|
}; |
|
3266
|
|
|
|
|
|
|
} |
|
3267
|
|
|
|
|
|
|
|
|
3268
|
|
|
|
|
|
|
|
|
3269
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyForeign_get) { xs::throw_guard(cv, [=]() |
|
3270
|
|
|
|
|
|
|
{ |
|
3271
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3272
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3273
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "SV*"); |
|
3274
|
|
|
|
|
|
|
{ |
|
3275
|
|
|
|
|
|
|
MyForeign * RETVAL; |
|
3276
|
|
|
|
|
|
|
#line 21 "t/typemap/object/foreign.xsi" |
|
3277
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3278
|
|
|
|
|
|
|
RETVAL = &_myforeign; |
|
3279
|
|
|
|
|
|
|
#line 3280 "t/typemap/object/object_xsgen.cc" |
|
3280
|
|
|
|
|
|
|
{ |
|
3281
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3282
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3283
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3284
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3285
|
|
|
|
|
|
|
} |
|
3286
|
|
|
|
|
|
|
} |
|
3287
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3288
|
1
|
50
|
|
|
|
|
}); } |
|
3289
|
|
|
|
|
|
|
|
|
3290
|
|
|
|
|
|
|
|
|
3291
|
|
|
|
|
|
|
|
|
3292
|
8
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyForeign_val) { xs::throw_guard(cv, [=]() |
|
3293
|
|
|
|
|
|
|
{ |
|
3294
|
4
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3295
|
4
|
50
|
|
|
|
|
if (items < 1 || items > 2) |
|
|
|
50
|
|
|
|
|
|
|
3296
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS, newval= NULL"); |
|
3297
|
|
|
|
|
|
|
{ |
|
3298
|
|
|
|
|
|
|
int RETVAL; |
|
3299
|
4
|
50
|
|
|
|
|
dXSTARG; |
|
|
|
0
|
|
|
|
|
|
|
3300
|
4
|
50
|
|
|
|
|
MyForeign* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
3301
|
|
|
|
|
|
|
; |
|
3302
|
|
|
|
|
|
|
SV* newval; |
|
3303
|
|
|
|
|
|
|
|
|
3304
|
3
|
100
|
|
|
|
|
if (items < 2) |
|
3305
|
2
|
|
|
|
|
|
newval = NULL; |
|
3306
|
|
|
|
|
|
|
else { |
|
3307
|
1
|
|
|
|
|
|
newval = ST(1) |
|
3308
|
1
|
|
|
|
|
|
; |
|
3309
|
|
|
|
|
|
|
} |
|
3310
|
|
|
|
|
|
|
#line 25 "t/typemap/object/foreign.xsi" |
|
3311
|
|
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
3312
|
|
|
|
|
|
|
RETVAL = THIS->val; |
|
3313
|
|
|
|
|
|
|
#line 3314 "t/typemap/object/object_xsgen.cc" |
|
3314
|
3
|
50
|
|
|
|
|
XSprePUSH; PUSHi((IV)RETVAL); |
|
|
|
50
|
|
|
|
|
|
|
3315
|
|
|
|
|
|
|
} |
|
3316
|
3
|
|
|
|
|
|
XSRETURN(1); |
|
3317
|
4
|
50
|
|
|
|
|
}); } |
|
3318
|
|
|
|
|
|
|
|
|
3319
|
|
|
|
|
|
|
|
|
3320
|
|
|
|
|
|
|
|
|
3321
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__MyForeign_DESTROY) { xs::throw_guard(cv, [=]() |
|
3322
|
|
|
|
|
|
|
{ |
|
3323
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3324
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3325
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "THIS"); |
|
3326
|
|
|
|
|
|
|
PERL_UNUSED_VAR(ax); /* -Wall */ |
|
3327
|
1
|
|
|
|
|
|
SP -= items; |
|
3328
|
|
|
|
|
|
|
{ |
|
3329
|
1
|
50
|
|
|
|
|
MyForeign* THIS = xs::in(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3330
|
|
|
|
|
|
|
; |
|
3331
|
|
|
|
|
|
|
#line 30 "t/typemap/object/foreign.xsi" |
|
3332
|
|
|
|
|
|
|
dcnt.perl++; |
|
3333
|
|
|
|
|
|
|
xs::Typemap().destroy(THIS, SvRV(ST(0))); |
|
3334
|
|
|
|
|
|
|
#line 3335 "t/typemap/object/object_xsgen.cc" |
|
3335
|
1
|
|
|
|
|
|
PUTBACK; |
|
3336
|
1
|
|
|
|
|
|
return; |
|
3337
|
|
|
|
|
|
|
} |
|
3338
|
1
|
50
|
|
|
|
|
}); } |
|
3339
|
|
|
|
|
|
|
|
|
3340
|
|
|
|
|
|
|
|
|
3341
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'foreign.xsi' */ |
|
3342
|
|
|
|
|
|
|
|
|
3343
|
|
|
|
|
|
|
|
|
3344
|
|
|
|
|
|
|
/* INCLUDE: Including 'casting.xsi' from 'object.xs' */ |
|
3345
|
|
|
|
|
|
|
|
|
3346
|
|
|
|
|
|
|
struct ObjectA {}; |
|
3347
|
|
|
|
|
|
|
struct ObjectB {}; |
|
3348
|
|
|
|
|
|
|
namespace xs { |
|
3349
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3350
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::ObjectA"; } |
|
3351
|
|
|
|
|
|
|
}; |
|
3352
|
|
|
|
|
|
|
|
|
3353
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
|
3354
|
1
|
50
|
|
|
|
|
static std::string package () { return "MyTest::ObjectB"; } |
|
3355
|
|
|
|
|
|
|
}; |
|
3356
|
|
|
|
|
|
|
} |
|
3357
|
|
|
|
|
|
|
|
|
3358
|
|
|
|
|
|
|
|
|
3359
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__ObjectA_new) { xs::throw_guard(cv, [=]() |
|
3360
|
|
|
|
|
|
|
{ |
|
3361
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3362
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3363
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS"); |
|
3364
|
|
|
|
|
|
|
{ |
|
3365
|
|
|
|
|
|
|
ObjectA * RETVAL; |
|
3366
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
3367
|
|
|
|
|
|
|
; |
|
3368
|
|
|
|
|
|
|
#line 20 "t/typemap/object/casting.xsi" |
|
3369
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3370
|
|
|
|
|
|
|
PROTO = CLASS; |
|
3371
|
|
|
|
|
|
|
RETVAL = new ObjectA(); |
|
3372
|
|
|
|
|
|
|
#line 3373 "t/typemap/object/object_xsgen.cc" |
|
3373
|
|
|
|
|
|
|
{ |
|
3374
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3375
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3376
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3377
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3378
|
|
|
|
|
|
|
} |
|
3379
|
|
|
|
|
|
|
} |
|
3380
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3381
|
1
|
50
|
|
|
|
|
}); } |
|
3382
|
|
|
|
|
|
|
|
|
3383
|
|
|
|
|
|
|
|
|
3384
|
|
|
|
|
|
|
|
|
3385
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__ObjectA_check) { xs::throw_guard(cv, [=]() |
|
3386
|
|
|
|
|
|
|
{ |
|
3387
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3388
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3389
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
3390
|
|
|
|
|
|
|
{ |
|
3391
|
|
|
|
|
|
|
bool RETVAL; |
|
3392
|
2
|
|
|
|
|
|
Sv obj = ST(0) |
|
3393
|
|
|
|
|
|
|
; |
|
3394
|
|
|
|
|
|
|
#line 23 "t/typemap/object/casting.xsi" |
|
3395
|
|
|
|
|
|
|
auto me = xs::in(obj); |
|
3396
|
|
|
|
|
|
|
(void)me; |
|
3397
|
|
|
|
|
|
|
RETVAL = true; |
|
3398
|
|
|
|
|
|
|
#line 3399 "t/typemap/object/object_xsgen.cc" |
|
3399
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3400
|
|
|
|
|
|
|
} |
|
3401
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3402
|
1
|
0
|
|
|
|
|
}); } |
|
3403
|
|
|
|
|
|
|
|
|
3404
|
|
|
|
|
|
|
|
|
3405
|
|
|
|
|
|
|
|
|
3406
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__ObjectB_new) { xs::throw_guard(cv, [=]() |
|
3407
|
|
|
|
|
|
|
{ |
|
3408
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3409
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3410
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "CLASS"); |
|
3411
|
|
|
|
|
|
|
{ |
|
3412
|
|
|
|
|
|
|
ObjectB * RETVAL; |
|
3413
|
1
|
|
|
|
|
|
SV* CLASS = ST(0) |
|
3414
|
|
|
|
|
|
|
; |
|
3415
|
|
|
|
|
|
|
#line 31 "t/typemap/object/casting.xsi" |
|
3416
|
|
|
|
|
|
|
xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
|
3417
|
|
|
|
|
|
|
PROTO = CLASS; |
|
3418
|
|
|
|
|
|
|
RETVAL = new ObjectB(); |
|
3419
|
|
|
|
|
|
|
#line 3420 "t/typemap/object/object_xsgen.cc" |
|
3420
|
|
|
|
|
|
|
{ |
|
3421
|
|
|
|
|
|
|
SV * RETVALSV; |
|
3422
|
1
|
50
|
|
|
|
|
RETVALSV = xs::out(RETVAL, PROTO).detach(); |
|
3423
|
1
|
50
|
|
|
|
|
RETVALSV = sv_2mortal(RETVALSV); |
|
3424
|
1
|
|
|
|
|
|
ST(0) = RETVALSV; |
|
3425
|
|
|
|
|
|
|
} |
|
3426
|
|
|
|
|
|
|
} |
|
3427
|
1
|
|
|
|
|
|
XSRETURN(1); |
|
3428
|
1
|
50
|
|
|
|
|
}); } |
|
3429
|
|
|
|
|
|
|
|
|
3430
|
|
|
|
|
|
|
|
|
3431
|
|
|
|
|
|
|
|
|
3432
|
2
|
|
|
|
|
|
XS_EUPXS(XS_MyTest__ObjectB_check) { xs::throw_guard(cv, [=]() |
|
3433
|
|
|
|
|
|
|
{ |
|
3434
|
1
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3435
|
1
|
50
|
|
|
|
|
if (items != 1) |
|
3436
|
0
|
|
|
|
|
|
croak_xs_usage(cv, "obj"); |
|
3437
|
|
|
|
|
|
|
{ |
|
3438
|
|
|
|
|
|
|
bool RETVAL; |
|
3439
|
2
|
|
|
|
|
|
Sv obj = ST(0) |
|
3440
|
|
|
|
|
|
|
; |
|
3441
|
|
|
|
|
|
|
#line 34 "t/typemap/object/casting.xsi" |
|
3442
|
|
|
|
|
|
|
auto me = xs::in(obj); |
|
3443
|
|
|
|
|
|
|
(void)me; |
|
3444
|
|
|
|
|
|
|
RETVAL = true; |
|
3445
|
|
|
|
|
|
|
#line 3446 "t/typemap/object/object_xsgen.cc" |
|
3446
|
0
|
0
|
|
|
|
|
ST(0) = boolSV(RETVAL); |
|
3447
|
|
|
|
|
|
|
} |
|
3448
|
0
|
|
|
|
|
|
XSRETURN(1); |
|
3449
|
1
|
0
|
|
|
|
|
}); } |
|
3450
|
|
|
|
|
|
|
|
|
3451
|
|
|
|
|
|
|
|
|
3452
|
|
|
|
|
|
|
/* INCLUDE: Returning to 'object.xs' from 'casting.xsi' */ |
|
3453
|
|
|
|
|
|
|
|
|
3454
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
3455
|
|
|
|
|
|
|
extern "C" |
|
3456
|
|
|
|
|
|
|
#endif |
|
3457
|
|
|
|
|
|
|
|
|
3458
|
68
|
|
|
|
|
|
XS_EXTERNAL(boot_MyTest__Typemap__Object) { xs::throw_guard(cv, [=]() mutable |
|
3459
|
|
|
|
|
|
|
{ |
|
3460
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
3461
|
|
|
|
|
|
|
dVAR; dXSARGS; |
|
3462
|
|
|
|
|
|
|
#else |
|
3463
|
34
|
50
|
|
|
|
|
dVAR; dXSBOOTARGSXSAPIVERCHK; |
|
|
|
50
|
|
|
|
|
|
|
3464
|
|
|
|
|
|
|
#endif |
|
3465
|
|
|
|
|
|
|
#if (PERL_REVISION == 5 && PERL_VERSION < 9) |
|
3466
|
|
|
|
|
|
|
char* file = __FILE__; |
|
3467
|
|
|
|
|
|
|
#else |
|
3468
|
34
|
|
|
|
|
|
const char* file = __FILE__; |
|
3469
|
|
|
|
|
|
|
#endif |
|
3470
|
|
|
|
|
|
|
|
|
3471
|
|
|
|
|
|
|
PERL_UNUSED_VAR(file); |
|
3472
|
|
|
|
|
|
|
|
|
3473
|
|
|
|
|
|
|
PERL_UNUSED_VAR(cv); /* -W */ |
|
3474
|
|
|
|
|
|
|
PERL_UNUSED_VAR(items); /* -W */ |
|
3475
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
3476
|
|
|
|
|
|
|
XS_VERSION_BOOTCHECK; |
|
3477
|
|
|
|
|
|
|
# ifdef XS_APIVERSION_BOOTCHECK |
|
3478
|
|
|
|
|
|
|
XS_APIVERSION_BOOTCHECK; |
|
3479
|
|
|
|
|
|
|
# endif |
|
3480
|
|
|
|
|
|
|
#endif |
|
3481
|
|
|
|
|
|
|
|
|
3482
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBase::new", XS_MyTest__PTRMyBase_new); |
|
3483
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBase::val", XS_MyTest__PTRMyBase_val); |
|
3484
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBase::set_from", XS_MyTest__PTRMyBase_set_from); |
|
3485
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBase::DESTROY", XS_MyTest__PTRMyBase_DESTROY); |
|
3486
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBase::new", XS_MyTest__MyBase_new); |
|
3487
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBase::val", XS_MyTest__MyBase_val); |
|
3488
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBase::get_val", XS_MyTest__MyBase_get_val); |
|
3489
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBase::set_from", XS_MyTest__MyBase_set_from); |
|
3490
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBase::DESTROY", XS_MyTest__MyBase_DESTROY); |
|
3491
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChild::new", XS_MyTest__PTRMyChild_new); |
|
3492
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChild::val2", XS_MyTest__PTRMyChild_val2); |
|
3493
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChild::set_from", XS_MyTest__PTRMyChild_set_from); |
|
3494
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChild::DESTROY", XS_MyTest__PTRMyChild_DESTROY); |
|
3495
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChild::new", XS_MyTest__MyChild_new); |
|
3496
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChild::val2", XS_MyTest__MyChild_val2); |
|
3497
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChild::set_from", XS_MyTest__MyChild_set_from); |
|
3498
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChild::DESTROY", XS_MyTest__MyChild_DESTROY); |
|
3499
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_ptr_myrefcounted", XS_MyTest_hold_ptr_myrefcounted); |
|
3500
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_ptr_myrefcounted", XS_MyTest_release_ptr_myrefcounted); |
|
3501
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_myrefcounted", XS_MyTest_hold_myrefcounted); |
|
3502
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_myrefcounted", XS_MyTest_release_myrefcounted); |
|
3503
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_ptr_myrefcounted_iptr", XS_MyTest_hold_ptr_myrefcounted_iptr); |
|
3504
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_ptr_myrefcounted_iptr", XS_MyTest_release_ptr_myrefcounted_iptr); |
|
3505
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_myrefcounted_iptr", XS_MyTest_hold_myrefcounted_iptr); |
|
3506
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_myrefcounted_iptr", XS_MyTest_release_myrefcounted_iptr); |
|
3507
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_ptr_mybase_sp", XS_MyTest_hold_ptr_mybase_sp); |
|
3508
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_ptr_mybase_sp", XS_MyTest_release_ptr_mybase_sp); |
|
3509
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::hold_mybase_sp", XS_MyTest_hold_mybase_sp); |
|
3510
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::release_mybase_sp", XS_MyTest_release_mybase_sp); |
|
3511
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCounted::new", XS_MyTest__PTRMyRefCounted_new); |
|
3512
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCounted::val", XS_MyTest__PTRMyRefCounted_val); |
|
3513
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCounted::DESTROY", XS_MyTest__PTRMyRefCounted_DESTROY); |
|
3514
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChild::new", XS_MyTest__PTRMyRefCountedChild_new); |
|
3515
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChild::val2", XS_MyTest__PTRMyRefCountedChild_val2); |
|
3516
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChild::DESTROY", XS_MyTest__PTRMyRefCountedChild_DESTROY); |
|
3517
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCounted::new", XS_MyTest__MyRefCounted_new); |
|
3518
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCounted::val", XS_MyTest__MyRefCounted_val); |
|
3519
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCounted::DESTROY", XS_MyTest__MyRefCounted_DESTROY); |
|
3520
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChild::new", XS_MyTest__MyRefCountedChild_new); |
|
3521
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChild::val2", XS_MyTest__MyRefCountedChild_val2); |
|
3522
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChild::DESTROY", XS_MyTest__MyRefCountedChild_DESTROY); |
|
3523
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedIPTR::new", XS_MyTest__PTRMyRefCountedIPTR_new); |
|
3524
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedIPTR::val", XS_MyTest__PTRMyRefCountedIPTR_val); |
|
3525
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedIPTR::DESTROY", XS_MyTest__PTRMyRefCountedIPTR_DESTROY); |
|
3526
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChildIPTR::new", XS_MyTest__PTRMyRefCountedChildIPTR_new); |
|
3527
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChildIPTR::val2", XS_MyTest__PTRMyRefCountedChildIPTR_val2); |
|
3528
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyRefCountedChildIPTR::DESTROY", XS_MyTest__PTRMyRefCountedChildIPTR_DESTROY); |
|
3529
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedIPTR::new", XS_MyTest__MyRefCountedIPTR_new); |
|
3530
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedIPTR::val", XS_MyTest__MyRefCountedIPTR_val); |
|
3531
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedIPTR::DESTROY", XS_MyTest__MyRefCountedIPTR_DESTROY); |
|
3532
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChildIPTR::new", XS_MyTest__MyRefCountedChildIPTR_new); |
|
3533
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChildIPTR::val2", XS_MyTest__MyRefCountedChildIPTR_val2); |
|
3534
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyRefCountedChildIPTR::DESTROY", XS_MyTest__MyRefCountedChildIPTR_DESTROY); |
|
3535
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBaseSP::new", XS_MyTest__PTRMyBaseSP_new); |
|
3536
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBaseSP::val", XS_MyTest__PTRMyBaseSP_val); |
|
3537
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyBaseSP::DESTROY", XS_MyTest__PTRMyBaseSP_DESTROY); |
|
3538
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChildSP::new", XS_MyTest__PTRMyChildSP_new); |
|
3539
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChildSP::val2", XS_MyTest__PTRMyChildSP_val2); |
|
3540
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyChildSP::DESTROY", XS_MyTest__PTRMyChildSP_DESTROY); |
|
3541
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseSP::new", XS_MyTest__MyBaseSP_new); |
|
3542
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseSP::val", XS_MyTest__MyBaseSP_val); |
|
3543
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseSP::DESTROY", XS_MyTest__MyBaseSP_DESTROY); |
|
3544
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChildSP::new", XS_MyTest__MyChildSP_new); |
|
3545
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChildSP::val2", XS_MyTest__MyChildSP_val2); |
|
3546
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyChildSP::DESTROY", XS_MyTest__MyChildSP_DESTROY); |
|
3547
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyStatic::new", XS_MyTest__PTRMyStatic_new); |
|
3548
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyStatic::val", XS_MyTest__PTRMyStatic_val); |
|
3549
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyStatic::DESTROY", XS_MyTest__PTRMyStatic_DESTROY); |
|
3550
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyStaticChild::new", XS_MyTest__PTRMyStaticChild_new); |
|
3551
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::PTRMyStaticChild::val2", XS_MyTest__PTRMyStaticChild_val2); |
|
3552
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyStatic::new", XS_MyTest__MyStatic_new); |
|
3553
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyStatic::val", XS_MyTest__MyStatic_val); |
|
3554
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyStatic::DESTROY", XS_MyTest__MyStatic_DESTROY); |
|
3555
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyStaticChild::new", XS_MyTest__MyStaticChild_new); |
|
3556
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyStaticChild::val2", XS_MyTest__MyStaticChild_val2); |
|
3557
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::new", XS_MyTest__BRUnit_new); |
|
3558
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::new_enabled", XS_MyTest__BRUnit_new_enabled); |
|
3559
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::retain", XS_MyTest__BRUnit_retain); |
|
3560
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::br_addr", XS_MyTest__BRUnit_br_addr); |
|
3561
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::rcnt_c", XS_MyTest__BRUnit_rcnt_c); |
|
3562
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::rcnt_sv", XS_MyTest__BRUnit_rcnt_sv); |
|
3563
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::id", XS_MyTest__BRUnit_id); |
|
3564
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRUnit::DESTROY", XS_MyTest__BRUnit_DESTROY); |
|
3565
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRStorage::new", XS_MyTest__BRStorage_new); |
|
3566
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRStorage::unit", XS_MyTest__BRStorage_unit); |
|
3567
|
34
|
|
|
|
|
|
cv = newXS_deffile("MyTest::BRStorage::set_unit_with_id", XS_MyTest__BRStorage_set_unit_with_id); |
|
3568
|
34
|
|
|
|
|
|
XSANY.any_i32 = 0; |
|
3569
|
34
|
|
|
|
|
|
cv = newXS_deffile("MyTest::BRStorage::set_unit_with_id2", XS_MyTest__BRStorage_set_unit_with_id); |
|
3570
|
34
|
|
|
|
|
|
XSANY.any_i32 = 1; |
|
3571
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::BRStorage::DESTROY", XS_MyTest__BRStorage_DESTROY); |
|
3572
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyOther::new", XS_MyTest__MyOther_new); |
|
3573
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyOther::other_val", XS_MyTest__MyOther_other_val); |
|
3574
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyOther::set_from", XS_MyTest__MyOther_set_from); |
|
3575
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyOther::DESTROY", XS_MyTest__MyOther_DESTROY); |
|
3576
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixBase::new", XS_MyTest__MixBase_new); |
|
3577
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixBase::val", XS_MyTest__MixBase_val); |
|
3578
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixBase::set_from", XS_MyTest__MixBase_set_from); |
|
3579
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixBase::DESTROY", XS_MyTest__MixBase_DESTROY); |
|
3580
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixBase::CLONE_SKIP", XS_MyTest__MixBase_CLONE_SKIP); |
|
3581
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginA::new", XS_MyTest__MixPluginA_new); |
|
3582
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginA::val_a", XS_MyTest__MixPluginA_val_a); |
|
3583
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginA::set_from", XS_MyTest__MixPluginA_set_from); |
|
3584
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginA::DESTROY", XS_MyTest__MixPluginA_DESTROY); |
|
3585
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginB::new", XS_MyTest__MixPluginB_new); |
|
3586
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginB::val_b", XS_MyTest__MixPluginB_val_b); |
|
3587
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginB::set_from", XS_MyTest__MixPluginB_set_from); |
|
3588
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MixPluginB::DESTROY", XS_MyTest__MixPluginB_DESTROY); |
|
3589
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseAV::new", XS_MyTest__MyBaseAV_new); |
|
3590
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseAV::val", XS_MyTest__MyBaseAV_val); |
|
3591
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseAV::DESTROY", XS_MyTest__MyBaseAV_DESTROY); |
|
3592
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseHV::new", XS_MyTest__MyBaseHV_new); |
|
3593
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseHV::val", XS_MyTest__MyBaseHV_val); |
|
3594
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyBaseHV::DESTROY", XS_MyTest__MyBaseHV_DESTROY); |
|
3595
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyThreadSafe::new", XS_MyTest__MyThreadSafe_new); |
|
3596
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyThreadSafe::val", XS_MyTest__MyThreadSafe_val); |
|
3597
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyThreadSafe::DESTROY", XS_MyTest__MyThreadSafe_DESTROY); |
|
3598
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyForeign::get", XS_MyTest__MyForeign_get); |
|
3599
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyForeign::val", XS_MyTest__MyForeign_val); |
|
3600
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::MyForeign::DESTROY", XS_MyTest__MyForeign_DESTROY); |
|
3601
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::ObjectA::new", XS_MyTest__ObjectA_new); |
|
3602
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::ObjectA::check", XS_MyTest__ObjectA_check); |
|
3603
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::ObjectB::new", XS_MyTest__ObjectB_new); |
|
3604
|
34
|
|
|
|
|
|
newXS_deffile("MyTest::ObjectB::check", XS_MyTest__ObjectB_check); |
|
3605
|
|
|
|
|
|
|
|
|
3606
|
|
|
|
|
|
|
/* Initialisation Section */ |
|
3607
|
|
|
|
|
|
|
|
|
3608
|
|
|
|
|
|
|
#line 28 "t/typemap/object/child.xsi" |
|
3609
|
|
|
|
|
|
|
{ |
|
3610
|
|
|
|
|
|
|
Stash("MyTest::PTRMyChild").inherit(Stash("MyTest::PTRMyBase")); |
|
3611
|
|
|
|
|
|
|
} |
|
3612
|
|
|
|
|
|
|
|
|
3613
|
|
|
|
|
|
|
#line 54 "t/typemap/object/child.xsi" |
|
3614
|
|
|
|
|
|
|
{ |
|
3615
|
|
|
|
|
|
|
Stash("MyTest::MyChild").inherit(Stash("MyTest::MyBase")); |
|
3616
|
|
|
|
|
|
|
} |
|
3617
|
|
|
|
|
|
|
|
|
3618
|
|
|
|
|
|
|
#line 160 "t/typemap/object/refcnt.xsi" |
|
3619
|
|
|
|
|
|
|
{ |
|
3620
|
|
|
|
|
|
|
Stash("MyTest::PTRMyRefCountedChild").inherit(Stash("MyTest::PTRMyRefCounted")); |
|
3621
|
|
|
|
|
|
|
} |
|
3622
|
|
|
|
|
|
|
|
|
3623
|
|
|
|
|
|
|
#line 193 "t/typemap/object/refcnt.xsi" |
|
3624
|
|
|
|
|
|
|
{ |
|
3625
|
|
|
|
|
|
|
Stash("MyTest::MyRefCountedChild").inherit(Stash("MyTest::MyRefCounted")); |
|
3626
|
|
|
|
|
|
|
} |
|
3627
|
|
|
|
|
|
|
|
|
3628
|
|
|
|
|
|
|
#line 226 "t/typemap/object/refcnt.xsi" |
|
3629
|
|
|
|
|
|
|
{ |
|
3630
|
|
|
|
|
|
|
Stash("MyTest::PTRMyRefCountedChildIPTR").inherit(Stash("MyTest::PTRMyRefCountedIPTR")); |
|
3631
|
|
|
|
|
|
|
} |
|
3632
|
|
|
|
|
|
|
|
|
3633
|
|
|
|
|
|
|
#line 259 "t/typemap/object/refcnt.xsi" |
|
3634
|
|
|
|
|
|
|
{ |
|
3635
|
|
|
|
|
|
|
Stash("MyTest::MyRefCountedChildIPTR").inherit(Stash("MyTest::MyRefCountedIPTR")); |
|
3636
|
|
|
|
|
|
|
} |
|
3637
|
|
|
|
|
|
|
|
|
3638
|
|
|
|
|
|
|
#line 292 "t/typemap/object/refcnt.xsi" |
|
3639
|
|
|
|
|
|
|
{ |
|
3640
|
|
|
|
|
|
|
Stash("MyTest::PTRMyChildSP").inherit(Stash("MyTest::PTRMyBaseSP")); |
|
3641
|
|
|
|
|
|
|
} |
|
3642
|
|
|
|
|
|
|
|
|
3643
|
|
|
|
|
|
|
#line 325 "t/typemap/object/refcnt.xsi" |
|
3644
|
|
|
|
|
|
|
{ |
|
3645
|
|
|
|
|
|
|
Stash("MyTest::MyChildSP").inherit(Stash("MyTest::MyBaseSP")); |
|
3646
|
|
|
|
|
|
|
} |
|
3647
|
|
|
|
|
|
|
|
|
3648
|
|
|
|
|
|
|
#line 64 "t/typemap/object/static_cast.xsi" |
|
3649
|
|
|
|
|
|
|
{ |
|
3650
|
|
|
|
|
|
|
Stash("MyTest::PTRMyStaticChild").inherit(Stash("MyTest::PTRMyStatic")); |
|
3651
|
|
|
|
|
|
|
} |
|
3652
|
|
|
|
|
|
|
|
|
3653
|
|
|
|
|
|
|
#line 100 "t/typemap/object/static_cast.xsi" |
|
3654
|
|
|
|
|
|
|
{ |
|
3655
|
|
|
|
|
|
|
Stash("MyTest::MyStaticChild").inherit(Stash("MyTest::MyStatic")); |
|
3656
|
|
|
|
|
|
|
} |
|
3657
|
|
|
|
|
|
|
|
|
3658
|
|
|
|
|
|
|
#line 19 "t/typemap/object/join.xsi" |
|
3659
|
|
|
|
|
|
|
{ |
|
3660
|
|
|
|
|
|
|
Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild")); |
|
3661
|
|
|
|
|
|
|
} |
|
3662
|
|
|
|
|
|
|
|
|
3663
|
|
|
|
|
|
|
#line 3664 "t/typemap/object/object_xsgen.cc" |
|
3664
|
|
|
|
|
|
|
|
|
3665
|
|
|
|
|
|
|
/* End of Initialisation Section */ |
|
3666
|
|
|
|
|
|
|
|
|
3667
|
|
|
|
|
|
|
#if PERL_VERSION_LE(5, 21, 5) |
|
3668
|
|
|
|
|
|
|
# if PERL_VERSION_GE(5, 9, 0) |
|
3669
|
|
|
|
|
|
|
if (PL_unitcheckav) |
|
3670
|
|
|
|
|
|
|
call_list(PL_scopestack_ix, PL_unitcheckav); |
|
3671
|
|
|
|
|
|
|
# endif |
|
3672
|
|
|
|
|
|
|
XSRETURN_YES; |
|
3673
|
|
|
|
|
|
|
#else |
|
3674
|
34
|
|
|
|
|
|
Perl_xs_boot_epilog(aTHX_ ax); |
|
3675
|
|
|
|
|
|
|
#endif |
|
3676
|
204
|
50
|
|
|
|
|
}); } |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
3677
|
|
|
|
|
|
|
|