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

petdance at svn.parrot.org petdance at svn.parrot.org
Thu May 6 03:40:24 UTC 2010


Author: petdance
Date: Thu May  6 03:40:23 2010
New Revision: 46327
URL: https://trac.parrot.org/parrot/changeset/46327

Log:
consting some args

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	Thu May  6 03:15:42 2010	(r46326)
+++ trunk/include/parrot/string_funcs.h	Thu May  6 03:40:23 2010	(r46327)
@@ -322,7 +322,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC* Parrot_str_split(PARROT_INTERP,
-    ARGIN_NULLOK(STRING *delim),
+    ARGIN_NULLOK(const STRING *delim),
     ARGIN_NULLOK(STRING *str))
         __attribute__nonnull__(1);
 

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Thu May  6 03:15:42 2010	(r46326)
+++ trunk/src/string/api.c	Thu May  6 03:40:23 2010	(r46327)
@@ -2213,7 +2213,7 @@
 Parrot_str_pin(SHIM_INTERP, ARGMOD(STRING *s))
 {
     ASSERT_ARGS(Parrot_str_pin)
-    size_t size   = Buffer_buflen(s);
+    const size_t size = Buffer_buflen(s);
     char  *memory = (char *)mem_internal_allocate(size);
 
     mem_sys_memcopy(memory, Buffer_bufstart(s), size);
@@ -3044,7 +3044,7 @@
 
 /*
 
-=item C<PMC* Parrot_str_split(PARROT_INTERP, STRING *delim, STRING *str)>
+=item C<PMC* Parrot_str_split(PARROT_INTERP, const STRING *delim, STRING *str)>
 
 Splits the string C<str> at the delimiter C<delim>, returning a
 C<ResizableStringArray>, or his mapped type in the current HLL, of results.
@@ -3059,7 +3059,7 @@
 PARROT_CAN_RETURN_NULL
 PMC*
 Parrot_str_split(PARROT_INTERP,
-    ARGIN_NULLOK(STRING *delim), ARGIN_NULLOK(STRING *str))
+    ARGIN_NULLOK(const STRING *delim), ARGIN_NULLOK(STRING *str))
 {
     ASSERT_ARGS(Parrot_str_split)
     PMC    *res;


More information about the parrot-commits mailing list