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

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Jun 22 00:07:46 UTC 2010


Author: bacek
Date: Tue Jun 22 00:07:46 2010
New Revision: 47748
URL: https://trac.parrot.org/parrot/changeset/47748

Log:
Initialize Sub.vtable_index with -1 as required by Namespace PMC to properly store Sub.

Modified:
   trunk/src/pmc/sub.pmc

Modified: trunk/src/pmc/sub.pmc
==============================================================================
--- trunk/src/pmc/sub.pmc	Mon Jun 21 23:20:46 2010	(r47747)
+++ trunk/src/pmc/sub.pmc	Tue Jun 22 00:07:46 2010	(r47748)
@@ -108,6 +108,7 @@
         attrs->outer_sub       = PMCNULL;
         attrs->multi_signature = PMCNULL;
         attrs->namespace_name  = PMCNULL;
+        attrs->vtable_index    = -1;
 
         PObj_custom_mark_destroy_SETALL(SELF);
     }
@@ -167,6 +168,8 @@
         field = CONST_STRING(INTERP, "vtable_index");
         if (VTABLE_exists_keyed_str(INTERP, init, field))
             attrs->vtable_index = VTABLE_get_integer_keyed_str(INTERP, init, field);
+        else
+            attrs->vtable_index = -1;
 
         field = CONST_STRING(INTERP, "multi_signature");
         if (VTABLE_exists_keyed_str(INTERP, init, field))


More information about the parrot-commits mailing list