[svn:parrot] r45330 - trunk/src/pmc

petdance at svn.parrot.org petdance at svn.parrot.org
Tue Mar 30 22:26:42 UTC 2010


Author: petdance
Date: Tue Mar 30 22:26:42 2010
New Revision: 45330
URL: https://trac.parrot.org/parrot/changeset/45330

Log:
consting

Modified:
   trunk/src/pmc/parrotinterpreter.pmc

Modified: trunk/src/pmc/parrotinterpreter.pmc
==============================================================================
--- trunk/src/pmc/parrotinterpreter.pmc	Tue Mar 30 21:46:38 2010	(r45329)
+++ trunk/src/pmc/parrotinterpreter.pmc	Tue Mar 30 22:26:42 2010	(r45330)
@@ -245,7 +245,7 @@
          * so we check, if the interpreter is already set up
          */
         if (!PMC_data(SELF)) {
-            Parrot_ParrotInterpreter_attributes *attrs =
+            Parrot_ParrotInterpreter_attributes * const attrs =
                 mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
         }
@@ -268,10 +268,11 @@
 */
 
     VTABLE void init_pmc(PMC *parent) {
+        /* XXX Can this be moved inside the block where it's used */
         Parrot_Interp p = PMC_interp(parent);
 
         if (!PMC_data(SELF)) {
-            Parrot_ParrotInterpreter_attributes *attrs =
+            Parrot_ParrotInterpreter_attributes * const attrs =
                 mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
         }
@@ -316,7 +317,7 @@
          * ParrotInterpreter through Parrot_pmc_new_noinit.  If this PMC hasn't been
          * initialized, cheat by initializing instead. */
         if (!PMC_data(SELF)) {
-            Parrot_ParrotInterpreter_attributes *attrs =
+            Parrot_ParrotInterpreter_attributes * const attrs =
                 mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
             PObj_custom_destroy_SET(SELF);


More information about the parrot-commits mailing list