Ticket #147: real_self.patch
File real_self.patch, 1.7 KB (added by donaldh, 13 years ago) |
---|
-
src/gc/dod.c
219 219 /* mark it live */ 220 220 PObj_live_SET(obj); 221 221 222 /* if object is a PMC and its real_self pointer points to another223 * PMC, we must mark that. */222 /* if object is a PMC and contains buffers or PMCs, then attach the PMC 223 * to the chained mark list. */ 224 224 if (PObj_is_PMC_TEST(obj)) { 225 225 PMC * const p = (PMC *)obj; 226 226 227 if (p->real_self != p)228 pobject_lives(interp, (PObj *)p->real_self);229 230 /* if object is a PMC and contains buffers or PMCs, then attach the PMC231 * to the chained mark list. */232 227 if (PObj_is_special_PMC_TEST(obj)) 233 228 mark_special(interp, p); 234 229 -
src/pmc.c
265 265 PARROT_ASSERT(pmc); 266 266 267 267 pmc->vtable = vtable; 268 pmc->real_self = pmc;269 268 VTABLE_set_pointer(interp, pmc, pmc); 270 269 } 271 270 … … 302 301 303 302 pmc = new_pmc_header(interp, flags); 304 303 pmc->vtable = vtable; 305 pmc->real_self = pmc;306 304 307 305 #ifdef GC_VERBOSE 308 306 if (Interp_flags_TEST(interp, PARROT_TRACE_FLAG)) { -
include/parrot/pobj.h
141 141 VTABLE *vtable; 142 142 DPOINTER *data; 143 143 struct PMC_EXT *pmc_ext; 144 PMC *real_self;145 144 }; 146 145 147 146 struct _Sync; /* forward decl */