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