t/typemap/object/threads.xsi

filter: Statementstmt 0.0% 0 / 7 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 23 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/cookbook/recipe13.xsi ↑ Summary t/cookbook/recipe12.xsi »
1 MODE: INLINE
2  
3 class MyThreadSafe : public virtual panda::Refcnt {
4 public:
5 int val;
6 MyThreadSafe (int arg) : val(arg) {}
7 virtual ~MyThreadSafe () { dcnt.c++; }
8 };
9  
10 namespace xs {
11 template <> struct Typemap<MyThreadSafe*> : TypemapObject<MyThreadSafe*, MyThreadSafe*, ObjectTypeRefcntPtr, ObjectStorageMG, DynamicCast> {
12 static std::string package () { return "MyTest::MyThreadSafe"; }
13 static MyThreadSafe* dup (MyThreadSafe* obj) { return obj; }
14 };
15 }
16  
17  
18 MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyThreadSafe
19 PROTOTYPES: DISABLE
20  
21 0 MyThreadSafe* MyThreadSafe::new (int arg)
22 0 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
0 0 0
23 0 ▶int MyThreadSafe::val (SV* newval = NULL) {
Branch: 4 branches
BranchTrueFalseTotal
int MyThreadSafe::val (SV* newval = NULL) { 0 0 0
int MyThreadSafe::val (SV* newval = NULL) { 0 0 0
int MyThreadSafe::val (SV* newval = NULL) { 0 0 0
int MyThreadSafe::val (SV* newval = NULL) { 0 0 0
24 0 ▶ if (newval) THIS->val = SvIV(newval);
Branch: 1 branch
BranchTrueFalseTotal
if (newval) THIS->val = SvIV(newval); 0 0 0
25 0 ▶ RETVAL = THIS->val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = THIS->val; 0 0 0
26 }
27  
28 void MyThreadSafe::DESTROY () {
29 0 dcnt.perl++;
30 0 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 0 0 0
« t/cookbook/recipe13.xsi ↑ Summary t/cookbook/recipe12.xsi »