line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
template |
4
|
|
|
|
|
|
|
class _MyChild : public _MyBase { |
5
|
|
|
|
|
|
|
public: |
6
|
|
|
|
|
|
|
int val2; |
7
|
|
|
|
|
|
|
_MyChild (int arg1, int arg2) : _MyBase(arg1), val2(arg2) {} |
8
|
|
|
|
|
|
|
_MyBase* clone () const { return new _MyChild(this->val, val2); } |
9
|
|
|
|
|
|
|
virtual ~_MyChild () { dcnt.c++; } |
10
|
|
|
|
|
|
|
}; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
using MyChild = _MyChild<0>; |
13
|
|
|
|
|
|
|
using PTRMyChild = _MyChild<1>; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
namespace xs { |
16
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
17
|
|
|
|
|
|
|
static std::string package () { return "MyTest::PTRMyChild"; } |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
20
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyChild"; } |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
MODULE = MyTest::Typemap::Object PACKAGE = MyTest::PTRMyChild |
26
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
BOOT { |
29
|
34
|
50
|
|
|
|
|
Stash("MyTest::PTRMyChild").inherit(Stash("MyTest::PTRMyBase")); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
4
|
|
|
|
|
|
PTRMyChild* PTRMyChild::new (int arg1, int arg2) |
33
|
2
|
50
|
|
|
|
|
|
34
|
2
|
50
|
|
|
|
|
int PTRMyChild::val2 (SV* newval = NULL) { |
35
|
2
|
50
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
36
|
2
|
|
|
|
|
|
RETVAL = THIS->val2; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
void PTRMyChild::set_from (PTRMyChild* other) { |
40
|
1
|
50
|
|
|
|
|
if (other) { |
41
|
1
|
|
|
|
|
|
THIS->val = other->val; |
42
|
1
|
|
|
|
|
|
THIS->val2 = other->val2; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
void PTRMyChild::DESTROY () { |
47
|
2
|
|
|
|
|
|
dcnt.perl++; |
48
|
2
|
50
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
49
|
2
|
50
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyChild |
52
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
BOOT { |
55
|
34
|
50
|
|
|
|
|
Stash("MyTest::MyChild").inherit(Stash("MyTest::MyBase")); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
MyChild* MyChild::new (int arg1, int arg2) { |
59
|
13
|
|
|
|
|
|
if (!arg1 && !arg2) XSRETURN_UNDEF; |
60
|
7
|
50
|
|
|
|
|
RETVAL = new MyChild(arg1, arg2); |
61
|
7
|
100
|
|
|
|
|
} |
|
|
50
|
|
|
|
|
|
62
|
6
|
50
|
|
|
|
|
|
63
|
|
|
|
|
|
|
int MyChild::val2 (SV* newval = NULL) { |
64
|
6
|
50
|
|
|
|
|
if (newval) THIS->val2 = SvIV(newval); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
65
|
6
|
|
|
|
|
|
RETVAL = THIS->val2; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
void MyChild::set_from (MyChild* other) { |
69
|
3
|
100
|
|
|
|
|
if (other) { |
70
|
2
|
|
|
|
|
|
THIS->val = other->val; |
71
|
2
|
|
|
|
|
|
THIS->val2 = other->val2; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
void MyChild::DESTROY () { |
76
|
6
|
|
|
|
|
|
dcnt.perl++; |
77
|
6
|
50
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
78
|
6
|
50
|
|
|
|
|
} |