ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/cfperl.xs
(Generate patch)

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.153 by root, Fri Jan 26 20:59:57 2007 UTC vs.
Revision 1.154 by root, Fri Jan 26 21:44:11 2007 UTC

118{ 118{
119 if (self 119 if (self
120 && SvREFCNT (self) == 1 120 && SvREFCNT (self) == 1
121 && !HvTOTALKEYS (self)) 121 && !HvTOTALKEYS (self))
122 { 122 {
123 SV *self = (SV *)this->self;
124
125 SvREFCNT_inc (self);
123 sv_unmagic ((SV *)self, PERL_MAGIC_ext); 126 sv_unmagic (self, PERL_MAGIC_ext);
127 SvREFCNT_dec (self);
124 assert (!self); 128 assert (!this->self);
125 } 129 }
126} 130}
127 131
128// check wether the object really is dead 132// check wether the object really is dead
129void 133void
147 } 151 }
148 152
149 if (self) 153 if (self)
150 { 154 {
151 hv_clear (self); 155 hv_clear (self);
156
157 SV *self = (SV *)this->self;
158 SvREFCNT_inc (self);
152 sv_unmagic ((SV *)self, PERL_MAGIC_ext); 159 sv_unmagic (self, PERL_MAGIC_ext);
160 SvREFCNT_dec (self);
153 // self is now 0 161 // self is now 0
154 assert (!self);//D//TODO remove soon 162 assert (!this->self);//D//TODO remove soon
155 } 163 }
156 164
157 mortals.push_back (this); 165 mortals.push_back (this);
158} 166}
159 167

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines