line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
template |
4
|
|
|
|
|
|
|
struct _MyConst { |
5
|
|
|
|
|
|
|
int val; |
6
|
|
|
|
|
|
|
_MyConst (int arg) : val(arg) {} |
7
|
|
|
|
|
|
|
int get_val () const { return val; } |
8
|
|
|
|
|
|
|
virtual _MyConst* clone () const { return new _MyConst(val); } |
9
|
|
|
|
|
|
|
virtual ~_MyConst () { dcnt.c++; } |
10
|
|
|
|
|
|
|
}; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
using MyConst = _MyConst<0>; |
13
|
|
|
|
|
|
|
using MyConst2 = _MyConst<1>; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
namespace xs { |
16
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
17
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyConst"; } |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
21
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyConst2"; } |
22
|
|
|
|
|
|
|
static Sv out (TYPE var, const Sv& proto = {}) { |
23
|
|
|
|
|
|
|
var->val = 555; |
24
|
|
|
|
|
|
|
return TypemapObject::out(var, proto); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
28
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyConst2"; } |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
MODULE = MyTest::Typemap PACKAGE = MyTest::MyConst |
34
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
|
MyConst* new (SV*, int arg) |
37
|
1
|
50
|
|
|
|
|
|
38
|
|
|
|
|
|
|
const MyConst* new_const (SV*, int arg) { |
39
|
4
|
|
|
|
|
|
RETVAL = new MyConst(arg); |
40
|
2
|
50
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
6
|
|
|
|
|
|
int MyConst::get_val () : const |
43
|
|
|
|
|
|
|
|
44
|
2
|
50
|
|
|
|
|
void MyConst::set_val (SV* newval) { THIS->val = SvIV(newval); } |
|
|
0
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
1
|
50
|
|
|
|
|
void MyConst::set_from (const MyConst* other) { if (other) THIS->val = other->val; } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
void MyConst::DESTROY () : const { |
49
|
3
|
|
|
|
|
|
dcnt.perl++; |
50
|
3
|
50
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
MODULE = MyTest::Typemap PACKAGE = MyTest::MyConst2 |
54
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
55
|
|
|
|
|
|
|
|
56
|
2
|
|
|
|
|
|
MyConst2* new (SV*, int arg) |
57
|
1
|
50
|
|
|
|
|
|
58
|
|
|
|
|
|
|
const MyConst2* new_const (SV*, int arg) { |
59
|
2
|
|
|
|
|
|
RETVAL = new MyConst2(arg); |
60
|
1
|
50
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
int MyConst2::get_val () : const { |
63
|
2
|
|
|
|
|
|
RETVAL = THIS->val; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
void MyConst2::set_val (SV* newval) { |
67
|
0
|
0
|
|
|
|
|
THIS->val = SvIV(newval); |
|
|
0
|
|
|
|
|
|
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
void MyConst2::set_from (const MyConst2* other) { |
71
|
0
|
0
|
|
|
|
|
if (other) THIS->val = other->val; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
void MyConst2::DESTROY () : const { |
75
|
2
|
|
|
|
|
|
dcnt.perl++; |
76
|
2
|
50
|
|
|
|
|
} |