[svn:parrot] r45905 - in branches/string_consting: include/parrot src

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Apr 22 13:03:37 UTC 2010


Author: bacek
Date: Thu Apr 22 13:03:37 2010
New Revision: 45905
URL: https://trac.parrot.org/parrot/changeset/45905

Log:
Consting Parrot_sprintf_format

Modified:
   branches/string_consting/include/parrot/misc.h
   branches/string_consting/src/spf_render.c

Modified: branches/string_consting/include/parrot/misc.h
==============================================================================
--- branches/string_consting/include/parrot/misc.h	Thu Apr 22 13:03:23 2010	(r45904)
+++ branches/string_consting/include/parrot/misc.h	Thu Apr 22 13:03:37 2010	(r45905)
@@ -306,7 +306,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 STRING * Parrot_sprintf_format(PARROT_INTERP,
-    ARGIN(STRING *pat),
+    ARGIN(const STRING *pat),
     ARGIN(SPRINTF_OBJ *obj))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)

Modified: branches/string_consting/src/spf_render.c
==============================================================================
--- branches/string_consting/src/spf_render.c	Thu Apr 22 13:03:23 2010	(r45904)
+++ branches/string_consting/src/spf_render.c	Thu Apr 22 13:03:37 2010	(r45905)
@@ -69,9 +69,9 @@
 PARROT_CANNOT_RETURN_NULL
 static STRING * handle_flags(PARROT_INTERP,
     ARGIN(const SpfInfo *info),
-    ARGIN(STRING *str),
+    ARGIN(const STRING *str),
     INTVAL is_int_type,
-    ARGIN_NULLOK(STRING* prefix))
+    ARGIN_NULLOK(const STRING* prefix))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
@@ -81,7 +81,7 @@
     ARGOUT(STRING *dest),
     ARGIN(const SpfInfo *info),
     ARGMOD(STRING *src),
-    ARGIN_NULLOK(STRING *prefix))
+    ARGIN_NULLOK(const STRING *prefix))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
@@ -126,8 +126,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 static STRING *
-handle_flags(PARROT_INTERP, ARGIN(const SpfInfo *info), ARGIN(STRING *str),
-        INTVAL is_int_type, ARGIN_NULLOK(STRING* prefix))
+handle_flags(PARROT_INTERP, ARGIN(const SpfInfo *info), ARGIN(const STRING *str),
+        INTVAL is_int_type, ARGIN_NULLOK(const STRING* prefix))
 {
     ASSERT_ARGS(handle_flags)
     UINTVAL len = Parrot_str_byte_length(interp, str);
@@ -233,7 +233,7 @@
 PARROT_CANNOT_RETURN_NULL
 static STRING*
 str_concat_w_flags(PARROT_INTERP, ARGOUT(STRING *dest), ARGIN(const SpfInfo *info),
-        ARGMOD(STRING *src), ARGIN_NULLOK(STRING *prefix))
+        ARGMOD(STRING *src), ARGIN_NULLOK(const STRING *prefix))
 {
     ASSERT_ARGS(str_concat_w_flags)
     src = handle_flags(interp, info, src, 1, prefix);
@@ -309,8 +309,8 @@
 
 /*
 
-=item C<STRING * Parrot_sprintf_format(PARROT_INTERP, STRING *pat, SPRINTF_OBJ
-*obj)>
+=item C<STRING * Parrot_sprintf_format(PARROT_INTERP, const STRING *pat,
+SPRINTF_OBJ *obj)>
 
 This is the engine that does all the formatting.
 
@@ -322,7 +322,7 @@
 PARROT_CANNOT_RETURN_NULL
 STRING *
 Parrot_sprintf_format(PARROT_INTERP,
-        ARGIN(STRING *pat), ARGIN(SPRINTF_OBJ *obj))
+        ARGIN(const STRING *pat), ARGIN(SPRINTF_OBJ *obj))
 {
     ASSERT_ARGS(Parrot_sprintf_format)
     INTVAL i;


More information about the parrot-commits mailing list