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

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Sep 4 18:13:04 UTC 2010


Author: chromatic
Date: Sat Sep  4 18:13:04 2010
New Revision: 48788
URL: https://trac.parrot.org/parrot/changeset/48788

Log:
[PMC] Used more CONST_STRING in StringHandle.

Modified:
   trunk/src/pmc/stringhandle.pmc

Modified: trunk/src/pmc/stringhandle.pmc
==============================================================================
--- trunk/src/pmc/stringhandle.pmc	Sat Sep  4 18:13:01 2010	(r48787)
+++ trunk/src/pmc/stringhandle.pmc	Sat Sep  4 18:13:04 2010	(r48788)
@@ -195,7 +195,7 @@
             if (encoding_is_utf8(INTERP, encoding))
                 new_string = string_make(INTERP, "", 0, "unicode", 0);
             else
-                new_string = Parrot_str_new(INTERP, "", 0);
+                new_string = CONST_STRING(INTERP, "");
 
             SET_ATTR_stringhandle(INTERP, SELF, new_string);
         }
@@ -203,7 +203,7 @@
         /* Set a default mode of read-only. */
         GET_ATTR_mode(INTERP, SELF, open_mode);
         if (STRING_IS_NULL(open_mode)) {
-            open_mode = Parrot_str_new_constant(INTERP, "r");
+            open_mode = CONST_STRING(INTERP, "r");
             SET_ATTR_mode(INTERP, SELF, open_mode);
         }
 
@@ -315,7 +315,7 @@
             if (encoding_is_utf8(INTERP, encoding))
                 string_result = string_make(INTERP, "", 0, "unicode", 0);
             else
-                string_result = Parrot_str_new_constant(INTERP, "");
+                string_result = CONST_STRING(INTERP, "");
         }
 
         RETURN(STRING *string_result);


More information about the parrot-commits mailing list