[svn:parrot] r45362 - trunk/src

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Mar 31 20:21:24 UTC 2010


Author: NotFound
Date: Wed Mar 31 20:21:24 2010
New Revision: 45362
URL: https://trac.parrot.org/parrot/changeset/45362

Log:
shorten and fix iglobals initialization

Modified:
   trunk/src/global_setup.c

Modified: trunk/src/global_setup.c
==============================================================================
--- trunk/src/global_setup.c	Wed Mar 31 20:11:36 2010	(r45361)
+++ trunk/src/global_setup.c	Wed Mar 31 20:21:24 2010	(r45362)
@@ -211,7 +211,7 @@
 parrot_global_setup_2(PARROT_INTERP)
 {
     ASSERT_ARGS(parrot_global_setup_2)
-    PMC *classname_hash, *iglobals;
+    PMC *classname_hash;
     int  i;
 
     create_initial_context(interp);
@@ -228,13 +228,8 @@
     Parrot_register_core_pmcs(interp, classname_hash);
 
     /* init the interpreter globals array */
-    iglobals         = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
-    interp->iglobals = iglobals;
-    VTABLE_set_integer_native(interp, iglobals, (INTVAL)IGLOBALS_SIZE);
-
-    /* clear the array */
-    for (i = 0; i < (INTVAL)IGLOBALS_SIZE; i++)
-        VTABLE_set_pmc_keyed_int(interp, iglobals, i, NULL);
+    interp->iglobals = Parrot_pmc_new_init_int(interp,
+            enum_class_FixedPMCArray, (INTVAL)IGLOBALS_SIZE);
 }
 
 /*


More information about the parrot-commits mailing list