… | |
… | |
50 | // optimisations/workaround for functions requiring my_perl in scope (anti-bloat) |
50 | // optimisations/workaround for functions requiring my_perl in scope (anti-bloat) |
51 | #undef localtime |
51 | #undef localtime |
52 | #undef srand48 |
52 | #undef srand48 |
53 | #undef drand48 |
53 | #undef drand48 |
54 | #undef srandom |
54 | #undef srandom |
|
|
55 | #undef opendir |
55 | #undef readdir |
56 | #undef readdir |
|
|
57 | #undef closedir |
56 | #undef getprotobyname |
58 | #undef getprotobyname |
57 | #undef gethostbyname |
59 | #undef gethostbyname |
58 | #undef ctime |
60 | #undef ctime |
59 | #undef strerror |
61 | #undef strerror |
60 | #undef _ |
62 | #undef _ |
… | |
… | |
109 | # define SvVAL64 SvIV |
111 | # define SvVAL64 SvIV |
110 | # define newSVuval64 newSVuv |
112 | # define newSVuval64 newSVuv |
111 | # define SvUVAL64 SvUV |
113 | # define SvUVAL64 SvUV |
112 | #else |
114 | #else |
113 | typedef double val64; |
115 | typedef double val64; |
|
|
116 | typedef double uval64; |
114 | # define newSVval64 newSVnv |
117 | # define newSVval64 newSVnv |
115 | # define SvVAL64 SvNV |
118 | # define SvVAL64 SvNV |
116 | # define newSVuval64 newSVnv |
119 | # define newSVuval64 newSVnv |
117 | # define SvUVAL64 SvNV |
120 | # define SvUVAL64 SvNV |
118 | #endif |
121 | #endif |
… | |
… | |
180 | INTERFACE_CLASS (attachable) |
183 | INTERFACE_CLASS (attachable) |
181 | struct attachable : refcnt_base |
184 | struct attachable : refcnt_base |
182 | { |
185 | { |
183 | static MGVTBL vtbl; |
186 | static MGVTBL vtbl; |
184 | |
187 | |
185 | static unordered_vector<attachable *> mortals; |
|
|
186 | MTH static void check_mortals (); |
|
|
187 | |
|
|
188 | enum { |
188 | enum { |
189 | F_DESTROYED = 0x01, |
189 | F_DESTROYED = 0x01, |
190 | F_DEBUG_TRACE = 0x02, |
190 | F_DEBUG_TRACE = 0x02, |
191 | }; |
191 | }; |
192 | int ACC (RW, flags); |
192 | uint8 ACC (RW, flags); |
|
|
193 | |
|
|
194 | static unordered_vector<attachable *> mortals; |
|
|
195 | MTH static void check_mortals (); |
193 | |
196 | |
194 | // object is delete'd after the refcount reaches 0 |
197 | // object is delete'd after the refcount reaches 0 |
195 | MTH int refcnt_cnt () const; |
198 | MTH int refcnt_cnt () const; |
196 | // check wether the object has died and destroy |
199 | // check wether the object has died and destroy |
197 | MTH void refcnt_chk () { if (expect_false (refcnt <= 0)) do_check (); } |
200 | MTH void refcnt_chk () { if (expect_false (refcnt <= 0)) do_check (); } |