| 1 |
|
| MODE: INLINE |
| 2 |
|
| |
| 3 |
|
| using MyBaseAV = _MyBase<2>; |
| 4 |
|
| using MyBaseHV = _MyBase<3>; |
| 5 |
|
| |
| 6 |
|
| namespace xs { |
| 7 |
|
| template <> struct Typemap<MyBaseAV*> : TypemapObject<MyBaseAV*, MyBaseAV*, ObjectTypePtr, ObjectStorageMG> { |
| 8 |
|
| static std::string package () { return "MyTest::MyBaseAV"; } |
| 9 |
|
| }; |
| 10 |
|
| template <> struct Typemap<MyBaseHV*> : TypemapObject<MyBaseHV*, MyBaseHV*, ObjectTypePtr, ObjectStorageMG> { |
| 11 |
|
| static std::string package () { return "MyTest::MyBaseHV"; } |
| 12 |
|
| }; |
| 13 |
|
| } |
| 14 |
|
| |
| 15 |
|
| MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyBaseAV |
| 16 |
|
| PROTOTYPES: DISABLE |
| 17 |
|
| |
| 18 |
|
| MyBaseAV* new (SV*, int arg) { |
| 19 |
2 |
| if (!arg) XSRETURN_UNDEF; |
| 20 |
2 |
▶ | RETVAL = new MyBaseAV(arg); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new MyBaseAV(arg); |
1 |
1 |
2 |
|
| 21 |
1 |
▶ | PROTO = Array::create(); |
Branch: 1 branch
| Branch | True | False | Total |
| PROTO = Array::create(); |
1 |
0 |
1 |
|
| 22 |
1 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
|
| 23 |
|
| |
| 24 |
|
| int MyBaseAV::val () { |
| 25 |
1 |
▶ | RETVAL = THIS->val; |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = THIS->val; |
0 |
1 |
1 |
|
| 26 |
|
| } |
| 27 |
|
| |
| 28 |
|
| void MyBaseAV::DESTROY () { |
| 29 |
1 |
| dcnt.perl++; |
| 30 |
1 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
|
| 31 |
|
| |
| 32 |
|
| MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyBaseHV |
| 33 |
|
| PROTOTYPES: DISABLE |
| 34 |
|
| |
| 35 |
|
| MyBaseHV* new (SV*, int arg) { |
| 36 |
2 |
| if (!arg) XSRETURN_UNDEF; |
| 37 |
2 |
▶ | RETVAL = new MyBaseHV(arg); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new MyBaseHV(arg); |
1 |
1 |
2 |
|
| 38 |
1 |
▶ | PROTO = Hash::create(); |
Branch: 1 branch
| Branch | True | False | Total |
| PROTO = Hash::create(); |
1 |
0 |
1 |
|
| 39 |
1 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
|
| 40 |
|
| |
| 41 |
|
| int MyBaseHV::val () { |
| 42 |
1 |
▶ | RETVAL = THIS->val; |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = THIS->val; |
0 |
1 |
1 |
|
| 43 |
|
| } |
| 44 |
|
| |
| 45 |
|
| void MyBaseHV::DESTROY () { |
| 46 |
1 |
| dcnt.perl++; |
| 47 |
1 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
|