[svn:parrot] r46801 - in trunk: include/parrot src/pmc src/string

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed May 19 18:39:33 UTC 2010


Author: NotFound
Date: Wed May 19 18:39:32 2010
New Revision: 46801
URL: https://trac.parrot.org/parrot/changeset/46801

Log:
add "flags" parameter to Parrot_str_unescape_string

Modified:
   trunk/include/parrot/string_funcs.h
   trunk/src/pmc/string.pmc
   trunk/src/string/api.c

Modified: trunk/include/parrot/string_funcs.h
==============================================================================
--- trunk/include/parrot/string_funcs.h	Wed May 19 18:33:06 2010	(r46800)
+++ trunk/include/parrot/string_funcs.h	Wed May 19 18:39:32 2010	(r46801)
@@ -390,7 +390,8 @@
 STRING * Parrot_str_unescape_string(PARROT_INTERP,
     ARGIN(const STRING *src),
     ARGIN(const CHARSET *charset),
-    ARGIN(const ENCODING *encoding))
+    ARGIN(const ENCODING *encoding),
+    UINTVAL flags)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)

Modified: trunk/src/pmc/string.pmc
==============================================================================
--- trunk/src/pmc/string.pmc	Wed May 19 18:33:06 2010	(r46800)
+++ trunk/src/pmc/string.pmc	Wed May 19 18:39:32 2010	(r46801)
@@ -820,7 +820,7 @@
             Parrot_encoding_number(INTERP, encodingname));
         STRING * const src = VTABLE_get_string(INTERP, SELF);
         STRING * const dest = Parrot_str_unescape_string(INTERP, src,
-                charset, encoding);
+                charset, encoding, 0);
         RETURN(STRING *dest);
     }
 

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Wed May 19 18:33:06 2010	(r46800)
+++ trunk/src/string/api.c	Wed May 19 18:39:32 2010	(r46801)
@@ -2528,7 +2528,7 @@
 /*
 
 =item C<STRING * Parrot_str_unescape_string(PARROT_INTERP, const STRING *src,
-const CHARSET *charset, const ENCODING *encoding)>
+const CHARSET *charset, const ENCODING *encoding, UINTVAL flags)>
 
 EXPERIMENTAL, see TT #1628
 
@@ -2545,12 +2545,13 @@
 STRING *
 Parrot_str_unescape_string(PARROT_INTERP, ARGIN(const STRING *src),
         ARGIN(const CHARSET *charset),
-        ARGIN(const ENCODING *encoding))
+        ARGIN(const ENCODING *encoding),
+	UINTVAL flags)
 {
     ASSERT_ARGS(Parrot_str_unescape_string)
 
     UINTVAL srclen = Parrot_str_byte_length(interp, src);
-    STRING *result = Parrot_gc_new_string_header(interp, 0);
+    STRING *result = Parrot_gc_new_string_header(interp, flags);
     String_iter itersrc;
     String_iter iterdest;
     UINTVAL reserved;


More information about the parrot-commits mailing list