Permalink
Browse files

avoid a temporary PMC in FPA set_string_keyed_int

git-svn-id: https://svn.parrot.org/parrot/trunk@46197 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
NotFound committed Apr 30, 2010
1 parent e59643a commit 06e2d1ee180045265d82c1245a6604519eaf554f
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/pmc/fixedintegerarray.pmc
@@ -444,11 +444,7 @@ Sets the Parrot string value of the element at index C<key> to C<value>.
*/
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);
}

0 comments on commit 06e2d1e

Please sign in to comment.