line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 : TypemapObject { |
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
|
0
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
|
int MyThreadSafe::val (SV* newval = NULL) { |
|
|
0
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
if (newval) THIS->val = SvIV(newval); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
RETVAL = THIS->val; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
void MyThreadSafe::DESTROY () { |
29
|
0
|
|
|
|
|
|
dcnt.perl++; |
30
|
0
|
0
|
|
|
|
|
} |