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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Fri Apr 30 12:49:04 UTC 2010


Author: NotFound
Date: Fri Apr 30 12:49:03 2010
New Revision: 46197
URL: https://trac.parrot.org/parrot/changeset/46197

Log:
avoid a temporary PMC in FPA set_string_keyed_int

Modified:
   trunk/src/pmc/fixedintegerarray.pmc

Modified: trunk/src/pmc/fixedintegerarray.pmc
==============================================================================
--- trunk/src/pmc/fixedintegerarray.pmc	Fri Apr 30 12:46:23 2010	(r46196)
+++ trunk/src/pmc/fixedintegerarray.pmc	Fri Apr 30 12:49:03 2010	(r46197)
@@ -444,11 +444,7 @@
 */
 
     VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
-        INTVAL tempInt;
-        PMC  * const tempPMC = Parrot_pmc_new_temporary(INTERP, enum_class_Integer);
-        VTABLE_set_string_native(INTERP, tempPMC, value);
-        tempInt        = VTABLE_get_integer(INTERP, tempPMC);
-        Parrot_pmc_free_temporary(interp, tempPMC);
+        const INTVAL tempInt = Parrot_str_to_int(INTERP, value);
         SELF.set_integer_keyed_int(key, tempInt);
     }
 


More information about the parrot-commits mailing list