… | |
… | |
60 | |
60 | |
61 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
61 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
62 | |
62 | |
63 | void cfperl_init (); |
63 | void cfperl_init (); |
64 | void cfperl_main (); |
64 | void cfperl_main (); |
|
|
65 | void cfperl_emergency_save (); |
65 | |
66 | |
66 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | |
68 | |
68 | // virtual server time, excluding time jumps and lag |
69 | // virtual server time, excluding time jumps and lag |
69 | extern double runtime; |
70 | extern double runtime; |
… | |
… | |
130 | static unordered_vector<attachable *> mortals; |
131 | static unordered_vector<attachable *> mortals; |
131 | MTH static void check_mortals (); |
132 | MTH static void check_mortals (); |
132 | |
133 | |
133 | enum { |
134 | enum { |
134 | F_DESTROYED = 0x01, |
135 | F_DESTROYED = 0x01, |
135 | F_BORROWED = 0x02, |
|
|
136 | }; |
136 | }; |
137 | |
137 | |
138 | // object is delete'd after the refcount reaches 0 |
138 | // object is delete'd after the refcount reaches 0 |
139 | mutable int ACC (RW, refcnt); |
139 | mutable int ACC (RW, refcnt); |
140 | int ACC (RW, flags); |
140 | int ACC (RW, flags); |
… | |
… | |
164 | |
164 | |
165 | HV *self; // CF+ perl self |
165 | HV *self; // CF+ perl self |
166 | AV *cb; // CF+ callbacks |
166 | AV *cb; // CF+ callbacks |
167 | shstr attach; // generic extension attachment information |
167 | shstr attach; // generic extension attachment information |
168 | |
168 | |
|
|
169 | void sever_self (); // sever this object from its self, if it has one. |
169 | void optimise (); // possibly save some memory by destroying unneeded data |
170 | void optimise (); // possibly save some memory by destroying unneeded data |
170 | |
171 | |
171 | attachable () |
172 | attachable () |
172 | : flags (0), refcnt (0), self (0), cb (0), attach (0) |
173 | : flags (0), refcnt (0), self (0), cb (0), attach (0) |
173 | { |
174 | { |
174 | } |
175 | } |