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

petdance at svn.parrot.org petdance at svn.parrot.org
Wed May 20 04:44:05 UTC 2009


Author: petdance
Date: Wed May 20 04:44:04 2009
New Revision: 38960
URL: https://trac.parrot.org/parrot/changeset/38960

Log:
teeny consting

Modified:
   trunk/src/pmc/exporter.pmc
   trunk/src/pmc/key.pmc
   trunk/src/pmc/lexpad.pmc

Modified: trunk/src/pmc/exporter.pmc
==============================================================================
--- trunk/src/pmc/exporter.pmc	Wed May 20 04:21:22 2009	(r38959)
+++ trunk/src/pmc/exporter.pmc	Wed May 20 04:44:04 2009	(r38960)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2007-2008, Parrot Foundation.
+Copyright (C) 2007-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -107,10 +107,10 @@
 */
 
     VTABLE void init() {
-        Parrot_Exporter_attributes *exp = NULL;
+        Parrot_Exporter_attributes * const exp =
+            mem_allocate_zeroed_typed(Parrot_Exporter_attributes);
 
         /* Set up the object. */
-        exp                  = mem_allocate_zeroed_typed(Parrot_Exporter_attributes);
         exp->ns_src          = PMCNULL;
         exp->ns_dest         = CONTEXT(interp)->current_namespace;
         exp->globals         = PMCNULL;
@@ -148,7 +148,7 @@
 */
 
     VTABLE void mark() {
-        Parrot_Exporter_attributes *exp = PARROT_EXPORTER(SELF);
+        Parrot_Exporter_attributes * const exp = PARROT_EXPORTER(SELF);
 
         if (exp->ns_src)
             Parrot_gc_mark_PObj_alive(interp, (PObj *)exp->ns_src);

Modified: trunk/src/pmc/key.pmc
==============================================================================
--- trunk/src/pmc/key.pmc	Wed May 20 04:21:22 2009	(r38959)
+++ trunk/src/pmc/key.pmc	Wed May 20 04:44:04 2009	(r38960)
@@ -41,7 +41,7 @@
 
     VTABLE void init() {
 
-        Parrot_Key_attributes *attrs =
+        Parrot_Key_attributes * const attrs =
             mem_allocate_zeroed_typed(Parrot_Key_attributes);
 
         PMC_data(SELF) = attrs;

Modified: trunk/src/pmc/lexpad.pmc
==============================================================================
--- trunk/src/pmc/lexpad.pmc	Wed May 20 04:21:22 2009	(r38959)
+++ trunk/src/pmc/lexpad.pmc	Wed May 20 04:44:04 2009	(r38960)
@@ -78,7 +78,7 @@
 
 */
     VTABLE void init_pmc(PMC *lexinfo) {
-        Parrot_LexPad_attributes *attrs =
+        Parrot_LexPad_attributes * const attrs =
             mem_allocate_zeroed_typed(Parrot_LexPad_attributes);
         attrs->lexinfo = lexinfo;
         PMC_data(SELF) = attrs;


More information about the parrot-commits mailing list