t/typemap/object/avhv.xsi

filter: Statementstmt 100% 14 / 14 Branchbran 58.3% 14 / 24 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 73.6% 28 / 38 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/typemap/object/single.xsi ↑ Summary src/xs/typemap/containers.h »
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
BranchTrueFalseTotal
RETVAL = new MyBaseAV(arg); 1 1 2
21 1 ▶ PROTO = Array::create();
Branch: 1 branch
BranchTrueFalseTotal
PROTO = Array::create(); 1 0 1
22 1 ▶}
Branch: 2 branches
BranchTrueFalseTotal
} 1 0 1
} 1 0 1
23  
24 int MyBaseAV::val () {
25 1 ▶ RETVAL = THIS->val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = THIS->val; 0 1 1
26 }
27  
28 void MyBaseAV::DESTROY () {
29 1 dcnt.perl++;
30 1 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 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
BranchTrueFalseTotal
RETVAL = new MyBaseHV(arg); 1 1 2
38 1 ▶ PROTO = Hash::create();
Branch: 1 branch
BranchTrueFalseTotal
PROTO = Hash::create(); 1 0 1
39 1 ▶}
Branch: 2 branches
BranchTrueFalseTotal
} 1 0 1
} 1 0 1
40  
41 int MyBaseHV::val () {
42 1 ▶ RETVAL = THIS->val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = THIS->val; 0 1 1
43 }
44  
45 void MyBaseHV::DESTROY () {
46 1 dcnt.perl++;
47 1 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 1 0 1
« t/typemap/object/single.xsi ↑ Summary src/xs/typemap/containers.h »