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

bacek at svn.parrot.org bacek at svn.parrot.org
Mon Apr 26 05:47:48 UTC 2010


Author: bacek
Date: Mon Apr 26 05:47:48 2010
New Revision: 46021
URL: https://trac.parrot.org/parrot/changeset/46021

Log:
Parrot_str_copy now can accept const STRING* because we don't modify it anymore

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

Modified: trunk/include/parrot/string_funcs.h
==============================================================================
--- trunk/include/parrot/string_funcs.h	Mon Apr 26 05:43:32 2010	(r46020)
+++ trunk/include/parrot/string_funcs.h	Mon Apr 26 05:47:48 2010	(r46021)
@@ -110,10 +110,9 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
-STRING * Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
+STRING * Parrot_str_copy(PARROT_INTERP, ARGIN(const STRING *s))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        FUNC_MODIFIES(*s);
+        __attribute__nonnull__(2);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Mon Apr 26 05:43:32 2010	(r46020)
+++ trunk/src/string/api.c	Mon Apr 26 05:47:48 2010	(r46021)
@@ -355,7 +355,7 @@
 
 /*
 
-=item C<STRING * Parrot_str_copy(PARROT_INTERP, STRING *s)>
+=item C<STRING * Parrot_str_copy(PARROT_INTERP, const STRING *s)>
 
 Creates and returns a shallow copy of the specified Parrot string.
 
@@ -367,7 +367,7 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 STRING *
-Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_copy(PARROT_INTERP, ARGIN(const STRING *s))
 {
     ASSERT_ARGS(Parrot_str_copy)
     STRING *d;


More information about the parrot-commits mailing list