[svn:parrot] r36235 - in branches/pdd28str_part2: include/parrot src/string

allison at svn.parrot.org allison at svn.parrot.org
Sun Feb 1 07:14:08 UTC 2009


Author: allison
Date: Sun Feb  1 07:14:08 2009
New Revision: 36235
URL: https://trac.parrot.org/parrot/changeset/36235

Log:
[pdd28str] Renaming 'Parrot_str_length'.

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

Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h	Sun Feb  1 07:06:21 2009	(r36234)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h	Sun Feb  1 07:14:08 2009	(r36235)
@@ -216,7 +216,7 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL string_compute_strlen(PARROT_INTERP, ARGMOD(STRING *s))
+INTVAL Parrot_str_length(PARROT_INTERP, ARGMOD(STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*s);
@@ -613,7 +613,7 @@
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_string_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_compute_strlen __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_length __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
 #define ASSERT_ARGS_Parrot_str_concat __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c	Sun Feb  1 07:06:21 2009	(r36234)
+++ branches/pdd28str_part2/src/string/api.c	Sun Feb  1 07:14:08 2009	(r36235)
@@ -786,7 +786,7 @@
         if (encoding == Parrot_fixed_8_encoding_ptr)
             s->strlen = len;
         else
-            string_compute_strlen(interp, s);
+            Parrot_str_length(interp, s);
 
         return s;
     }
@@ -799,7 +799,7 @@
         if (encoding == Parrot_fixed_8_encoding_ptr)
             s->strlen = len;
         else
-            string_compute_strlen(interp, s);
+            Parrot_str_length(interp, s);
     }
     else {
         s->strlen = s->bufused = 0;
@@ -1034,7 +1034,7 @@
 
 =over 4
 
-=item C<INTVAL string_compute_strlen>
+=item C<INTVAL Parrot_str_length>
 
 Calculates and returns the number of characters in the specified Parrot string.
 
@@ -1045,9 +1045,9 @@
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
 INTVAL
-string_compute_strlen(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_length(PARROT_INTERP, ARGMOD(STRING *s))
 {
-    ASSERT_ARGS(string_compute_strlen)
+    ASSERT_ARGS(Parrot_str_length)
 
     s->strlen = CHARSET_CODEPOINTS(interp, s);
     return s->strlen;
@@ -1358,7 +1358,7 @@
                 rep->strstart, rep->bufused);
 
         if (diff)
-            (void)string_compute_strlen(interp, src);
+            (void)Parrot_str_length(interp, src);
     }
 
     /* Replacement is larger than avail buffer, grow the string */
@@ -1376,7 +1376,7 @@
         mem_sys_memcopy((char *)src->strstart + start_byte, rep->strstart,
                 rep->bufused);
         src->bufused += diff;
-        (void)string_compute_strlen(interp, src);
+        (void)Parrot_str_length(interp, src);
     }
 
     /* src is modified, now return the original substring */
@@ -2644,7 +2644,7 @@
 
     /* this also validates the string */
     if (encoding != result->encoding)
-        string_compute_strlen(interp, result);
+        Parrot_str_length(interp, result);
 
     if (!CHARSET_VALIDATE(interp, result, 0))
         Parrot_ex_throw_from_c_args(interp, NULL,


More information about the parrot-commits mailing list