line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
class MyOther { |
4
|
|
|
|
|
|
|
public: |
5
|
|
|
|
|
|
|
int val; |
6
|
|
|
|
|
|
|
MyOther (int arg) : val(arg) {} |
7
|
|
|
|
|
|
|
virtual ~MyOther () { dcnt.c++; } |
8
|
|
|
|
|
|
|
}; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
namespace xs { |
11
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
12
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyOther"; } |
13
|
|
|
|
|
|
|
}; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyOther |
17
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
BOOT { |
20
|
34
|
50
|
|
|
|
|
Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild")); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
MyOther* MyOther::new (int arg1, int arg2) { |
24
|
5
|
|
|
|
|
|
PROTO = Sub(cv).SUPER().call(&ST(0), items); |
25
|
3
|
50
|
|
|
|
|
if (!PROTO.defined()) XSRETURN_UNDEF; |
26
|
3
|
50
|
|
|
|
|
RETVAL = new MyOther(arg1 + arg2); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
27
|
3
|
100
|
|
|
|
|
} |
28
|
2
|
50
|
|
|
|
|
|
29
|
|
|
|
|
|
|
int MyOther::other_val (SV* newval = NULL) { |
30
|
4
|
50
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
31
|
4
|
|
|
|
|
|
RETVAL = THIS->val; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
void MyOther::set_from (MyOther* other) { |
35
|
2
|
50
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
36
|
2
|
100
|
|
|
|
|
if (other) THIS->val = other->val; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
void MyOther::DESTROY () { |
40
|
2
|
|
|
|
|
|
dcnt.perl++; |
41
|
2
|
50
|
|
|
|
|
Sub(cv).SUPER().call(&ST(0), items); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
42
|
2
|
50
|
|
|
|
|
} |