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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue Mar 3 16:32:30 UTC 2009


Author: NotFound
Date: Tue Mar  3 16:32:27 2009
New Revision: 37095
URL: https://trac.parrot.org/parrot/changeset/37095

Log:
[pmc] Fix String.set_string_native

Modified:
   trunk/src/pmc/string.pmc

Modified: trunk/src/pmc/string.pmc
==============================================================================
--- trunk/src/pmc/string.pmc	Tue Mar  3 15:50:44 2009	(r37094)
+++ trunk/src/pmc/string.pmc	Tue Mar  3 16:32:27 2009	(r37095)
@@ -249,10 +249,8 @@
 
     VTABLE void set_string_native(STRING *value) {
         /* Only allow constant PMCs to embed constant strings */
-        if (PObj_constant_TEST(SELF) && !PObj_constant_TEST(value)) {
-             const char *copy = Parrot_str_to_cstring(INTERP, value);
-             value            = Parrot_str_new_constant(INTERP, copy);
-        }
+        if (PObj_constant_TEST(SELF) && !PObj_constant_TEST(value))
+             value = Parrot_str_copy(INTERP, value);
 
         SET_ATTR_str_val(INTERP, SELF, value);
     }


More information about the parrot-commits mailing list