Author: chromatic
Date: Tue Jun 12 12:47:46 2007
New Revision: 18960

Modified:
   trunk/src/headers.c
   trunk/src/pmc.c

Log:
[PMC] Santized some uses of PMC flags when creating new PMC headers.

Modified: trunk/src/headers.c
==============================================================================
--- trunk/src/headers.c (original)
+++ trunk/src/headers.c Tue Jun 12 12:47:46 2007
@@ -225,7 +225,7 @@
     }
     else
         pmc->pmc_ext = NULL;
-    PObj_get_FLAGS(pmc) |= PObj_is_PMC_FLAG|flags;
+    PObj_get_FLAGS(pmc) = PObj_is_PMC_FLAG|flags;
     pmc->vtable = NULL;
 #if ! PMC_DATA_IN_EXT
     PMC_data(pmc) = NULL;

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c     (original)
+++ trunk/src/pmc.c     Tue Jun 12 12:47:46 2007
@@ -188,7 +188,7 @@
         return pmc;
     }
     if (vtable->flags & VTABLE_IS_CONST_PMC_FLAG) {
-        flags = PObj_constant_FLAG;
+        flags |= PObj_constant_FLAG;
     }
     else if (vtable->flags & VTABLE_IS_CONST_FLAG) {
         /* put the normal vtable in, so that the pmc can be initialized first
@@ -204,7 +204,7 @@
          * see e.g. t/pmc/sarray_13.pir
          */
 #if 0
-        flags = PObj_constant_FLAG;
+        flags |= PObj_constant_FLAG;
 #endif
         --base_type;
         vtable = interp->vtables[base_type];
@@ -316,7 +316,7 @@
 PMC *
 constant_pmc_new_init(Interp *interp, INTVAL base_type, PMC *init)
 {
-    PMC * const pmc = get_new_pmc_header(interp, base_type, 1);
+    PMC * const pmc = get_new_pmc_header(interp, base_type, 
PObj_constant_FLAG);
     VTABLE_init_pmc(interp, pmc, init);
     return pmc;
 }

Reply via email to