[svn:parrot] r36311 - in branches/pdd28str_part2: include/parrot src src/ops src/pmc src/string

allison at svn.parrot.org allison at svn.parrot.org
Tue Feb 3 02:10:29 UTC 2009


Author: allison
Date: Tue Feb  3 02:10:29 2009
New Revision: 36311
URL: https://trac.parrot.org/parrot/changeset/36311

Log:
[pdd28str] Renaming case-changing string functions.

Modified:
   branches/pdd28str_part2/include/parrot/string_funcs.h
   branches/pdd28str_part2/src/hll.c
   branches/pdd28str_part2/src/ops/string.ops
   branches/pdd28str_part2/src/pmc/string.pmc
   branches/pdd28str_part2/src/spf_render.c
   branches/pdd28str_part2/src/string/api.c

Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h	Tue Feb  3 02:10:29 2009	(r36311)
@@ -247,12 +247,12 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
-STRING * string_downcase(PARROT_INTERP, ARGIN(const STRING *s))
+STRING * Parrot_str_downcase(PARROT_INTERP, ARGIN(const STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
-void string_downcase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
+void Parrot_str_downcase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*s);
@@ -464,12 +464,12 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
-STRING * string_titlecase(PARROT_INTERP, ARGIN(const STRING *s))
+STRING * Parrot_str_titlecase(PARROT_INTERP, ARGIN(const STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
-void string_titlecase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
+void Parrot_str_titlecase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*s);
@@ -514,11 +514,11 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
-STRING * string_upcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
+STRING * Parrot_str_upcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-void string_upcase_inplace(PARROT_INTERP, ARGMOD_NULLOK(STRING *s))
+void Parrot_str_upcase_inplace(PARROT_INTERP, ARGMOD_NULLOK(STRING *s))
         __attribute__nonnull__(1)
         FUNC_MODIFIES(*s);
 
@@ -614,10 +614,10 @@
 #define ASSERT_ARGS_Parrot_str_free_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
 #define ASSERT_ARGS_Parrot_str_finish __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
-#define ASSERT_ARGS_string_downcase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_downcase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
 #define ASSERT_ARGS_Parrot_str_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -695,10 +695,10 @@
     || PARROT_ASSERT_ARG(s2)
 #define ASSERT_ARGS_Parrot_str_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
-#define ASSERT_ARGS_string_titlecase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_titlecase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
 #define ASSERT_ARGS_Parrot_str_to_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -714,9 +714,9 @@
 #define ASSERT_ARGS_Parrot_str_unpin __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(s)
-#define ASSERT_ARGS_string_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_upcase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_upcase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_str_from_int_base __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \

Modified: branches/pdd28str_part2/src/hll.c
==============================================================================
--- branches/pdd28str_part2/src/hll.c	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/src/hll.c	Tue Feb  3 02:10:29 2009	(r36311)
@@ -183,7 +183,7 @@
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, name);
 
     /* create HLL namespace using the *constant* name */
-    hll_name = string_downcase(interp, VTABLE_get_string(interp, name));
+    hll_name = Parrot_str_downcase(interp, VTABLE_get_string(interp, name));
 
     /* HLL type mappings aren't yet created, we can't create
      * a namespace in HLL's flavor yet - maybe promote the
@@ -530,7 +530,7 @@
             if (!hll_name)
                 continue;
 
-            string_downcase_inplace(interp, hll_name);
+            Parrot_str_downcase_inplace(interp, hll_name);
 
             /* XXX as in Parrot_register_HLL() this needs to be fixed to use
              * the correct type of namespace. It's relatively easy to do that

Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/src/ops/string.ops	Tue Feb  3 02:10:29 2009	(r36311)
@@ -417,11 +417,11 @@
 =cut
 
 inline op upcase(out STR, in STR) :base_core {
-    $1 = string_upcase(interp, $2);
+    $1 = Parrot_str_upcase(interp, $2);
 }
 
 inline op upcase(inout STR) :base_core {
-    string_upcase_inplace(interp, $1);
+    Parrot_str_upcase_inplace(interp, $1);
 }
 
 
@@ -436,11 +436,11 @@
 =cut
 
 inline op downcase(out STR, in STR) :base_core {
-    $1 = string_downcase(interp, $2);
+    $1 = Parrot_str_downcase(interp, $2);
 }
 
 inline op downcase(inout STR) :base_core {
-    string_downcase_inplace(interp, $1);
+    Parrot_str_downcase_inplace(interp, $1);
 }
 
 
@@ -455,11 +455,11 @@
 =cut
 
 inline op titlecase(out STR, in STR) :base_core {
-    $1 = string_titlecase(interp, $2);
+    $1 = Parrot_str_titlecase(interp, $2);
 }
 
 inline op titlecase(inout STR) :base_core {
-    string_titlecase_inplace(interp, $1);
+    Parrot_str_titlecase_inplace(interp, $1);
 }
 
 

Modified: branches/pdd28str_part2/src/pmc/string.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/string.pmc	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/src/pmc/string.pmc	Tue Feb  3 02:10:29 2009	(r36311)
@@ -829,7 +829,7 @@
 */
 
     METHOD lower() {
-        STRING * const s   = string_downcase(INTERP,
+        STRING * const s   = Parrot_str_downcase(INTERP,
             VTABLE_get_string(INTERP, SELF));
 
         RETURN(STRING *s);

Modified: branches/pdd28str_part2/src/spf_render.c
==============================================================================
--- branches/pdd28str_part2/src/spf_render.c	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/src/spf_render.c	Tue Feb  3 02:10:29 2009	(r36311)
@@ -640,7 +640,7 @@
                                 obj->getuint(interp, info.type, obj);
                             STRING * const ts =
                                 Parrot_str_from_uint(interp, tc, theuint, 16, 0);
-                            string_upcase_inplace(interp, ts);
+                            Parrot_str_upcase_inplace(interp, ts);
 
                             /* unsigned conversion - no plus */
                             info.flags &= ~FLAG_PLUS;

Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c	Tue Feb  3 01:16:16 2009	(r36310)
+++ branches/pdd28str_part2/src/string/api.c	Tue Feb  3 02:10:29 2009	(r36311)
@@ -2611,7 +2611,7 @@
 
 /*
 
-=item C<STRING * string_upcase>
+=item C<STRING * Parrot_str_upcase>
 
 Returns a copy of the specified Parrot string converted to upper case.
 Non-caseable characters are left unchanged.
@@ -2624,9 +2624,9 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 STRING *
-string_upcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
+Parrot_str_upcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
 {
-    ASSERT_ARGS(string_upcase)
+    ASSERT_ARGS(Parrot_str_upcase)
     if (STRING_IS_NULL(s)) {
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
             "Can't upcase NULL string");
@@ -2634,7 +2634,7 @@
     else {
         DECL_CONST_CAST;
         STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
-        string_upcase_inplace(interp, dest);
+        Parrot_str_upcase_inplace(interp, dest);
         return dest;
     }
 }
@@ -2642,7 +2642,7 @@
 
 /*
 
-=item C<void string_upcase_inplace>
+=item C<void Parrot_str_upcase_inplace>
 
 Converts the specified Parrot string to upper case.
 
@@ -2652,9 +2652,9 @@
 
 PARROT_EXPORT
 void
-string_upcase_inplace(PARROT_INTERP, ARGMOD_NULLOK(STRING *s))
+Parrot_str_upcase_inplace(PARROT_INTERP, ARGMOD_NULLOK(STRING *s))
 {
-    ASSERT_ARGS(string_upcase_inplace)
+    ASSERT_ARGS(Parrot_str_upcase_inplace)
     if (STRING_IS_NULL(s)) {
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
             "Can't upcase NULL string");
@@ -2668,7 +2668,7 @@
 
 /*
 
-=item C<STRING * string_downcase>
+=item C<STRING * Parrot_str_downcase>
 
 Returns a copy of the specified Parrot string converted to lower case.
 Non-caseable characters are left unchanged.
@@ -2681,19 +2681,19 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 STRING *
-string_downcase(PARROT_INTERP, ARGIN(const STRING *s))
+Parrot_str_downcase(PARROT_INTERP, ARGIN(const STRING *s))
 {
-    ASSERT_ARGS(string_downcase)
+    ASSERT_ARGS(Parrot_str_downcase)
     DECL_CONST_CAST;
     STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
-    string_downcase_inplace(interp, dest);
+    Parrot_str_downcase_inplace(interp, dest);
     return dest;
 }
 
 
 /*
 
-=item C<void string_downcase_inplace>
+=item C<void Parrot_str_downcase_inplace>
 
 Converts the specified Parrot string to lower case.
 
@@ -2703,9 +2703,9 @@
 
 PARROT_EXPORT
 void
-string_downcase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_downcase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
 {
-    ASSERT_ARGS(string_downcase_inplace)
+    ASSERT_ARGS(Parrot_str_downcase_inplace)
     /*
      * TODO get rid of all the inplace variants. We have for utf8:
      * * 1 Parrot_str_copy from the non-incase variant
@@ -2719,7 +2719,7 @@
 
 /*
 
-=item C<STRING * string_titlecase>
+=item C<STRING * Parrot_str_titlecase>
 
 Returns a copy of the specified Parrot string converted to title case.
 Non-caseable characters are left unchanged.
@@ -2732,19 +2732,19 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 STRING *
-string_titlecase(PARROT_INTERP, ARGIN(const STRING *s))
+Parrot_str_titlecase(PARROT_INTERP, ARGIN(const STRING *s))
 {
-    ASSERT_ARGS(string_titlecase)
+    ASSERT_ARGS(Parrot_str_titlecase)
     DECL_CONST_CAST;
     STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
-    string_titlecase_inplace(interp, dest);
+    Parrot_str_titlecase_inplace(interp, dest);
     return dest;
 }
 
 
 /*
 
-=item C<void string_titlecase_inplace>
+=item C<void Parrot_str_titlecase_inplace>
 
 Converts the specified Parrot string to title case.
 
@@ -2754,9 +2754,9 @@
 
 PARROT_EXPORT
 void
-string_titlecase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_titlecase_inplace(PARROT_INTERP, ARGMOD(STRING *s))
 {
-    ASSERT_ARGS(string_titlecase_inplace)
+    ASSERT_ARGS(Parrot_str_titlecase_inplace)
     Parrot_str_write_COW(interp, s);
     CHARSET_TITLECASE(interp, s);
 }


More information about the parrot-commits mailing list