line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODE: INLINE |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
struct MyForeign { |
4
|
|
|
|
|
|
|
int val; |
5
|
|
|
|
|
|
|
MyForeign (int arg) : val(arg) {} |
6
|
|
|
|
|
|
|
virtual ~MyForeign () { dcnt.c++; } |
7
|
|
|
|
|
|
|
}; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
static MyForeign _myforeign(789); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
namespace xs { |
12
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
13
|
|
|
|
|
|
|
static std::string package () { return "MyTest::MyForeign"; } |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyForeign |
18
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
MyForeign* get (SV*) { |
21
|
2
|
|
|
|
|
|
RETVAL = &_myforeign; |
22
|
1
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
int MyForeign::val (SV* newval = NULL) { |
25
|
3
|
100
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
26
|
3
|
|
|
|
|
|
RETVAL = THIS->val; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
void MyForeign::DESTROY () { |
30
|
1
|
|
|
|
|
|
dcnt.perl++; |
31
|
1
|
50
|
|
|
|
|
} |