Ticket #147: real_self.patch

File real_self.patch, 1.7 KB (added by donaldh, 13 years ago)
  • src/gc/dod.c

     
    219219    /* mark it live */ 
    220220    PObj_live_SET(obj); 
    221221 
    222     /* if object is a PMC and its real_self pointer points to another 
    223      * 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. */ 
    224224    if (PObj_is_PMC_TEST(obj)) { 
    225225        PMC * const p = (PMC *)obj; 
    226226 
    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 PMC 
    231          * to the chained mark list. */ 
    232227        if (PObj_is_special_PMC_TEST(obj)) 
    233228            mark_special(interp, p); 
    234229 
  • src/pmc.c

     
    265265            PARROT_ASSERT(pmc); 
    266266 
    267267            pmc->vtable    = vtable; 
    268             pmc->real_self = pmc; 
    269268            VTABLE_set_pointer(interp, pmc, pmc); 
    270269        } 
    271270 
     
    302301 
    303302    pmc            = new_pmc_header(interp, flags); 
    304303    pmc->vtable    = vtable; 
    305     pmc->real_self = pmc; 
    306304 
    307305#ifdef GC_VERBOSE 
    308306    if (Interp_flags_TEST(interp, PARROT_TRACE_FLAG)) { 
  • include/parrot/pobj.h

     
    141141    VTABLE         *vtable; 
    142142    DPOINTER       *data; 
    143143    struct PMC_EXT *pmc_ext; 
    144     PMC            *real_self; 
    145144}; 
    146145 
    147146struct _Sync;   /* forward decl */