[svn:parrot] r45432 - in branches/immutable_strings_part1: include/parrot src/string

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Apr 7 21:15:54 UTC 2010


Author: chromatic
Date: Wed Apr  7 21:15:54 2010
New Revision: 45432
URL: https://trac.parrot.org/parrot/changeset/45432

Log:
Remove Parrot_str_copy. "Rock is always a rock. Why copy it?"

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

Modified: branches/immutable_strings_part1/include/parrot/string_funcs.h
==============================================================================
--- branches/immutable_strings_part1/include/parrot/string_funcs.h	Wed Apr  7 21:15:51 2010	(r45431)
+++ branches/immutable_strings_part1/include/parrot/string_funcs.h	Wed Apr  7 21:15:54 2010	(r45432)
@@ -136,14 +136,6 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING * Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        FUNC_MODIFIES(*s);
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
 PARROT_MALLOC
 STRING * Parrot_str_downcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
         __attribute__nonnull__(1);
@@ -555,9 +547,6 @@
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_str_concat __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_str_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(s))
 #define ASSERT_ARGS_Parrot_str_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_Parrot_str_downcase_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\

Modified: branches/immutable_strings_part1/src/string/api.c
==============================================================================
--- branches/immutable_strings_part1/src/string/api.c	Wed Apr  7 21:15:51 2010	(r45431)
+++ branches/immutable_strings_part1/src/string/api.c	Wed Apr  7 21:15:54 2010	(r45432)
@@ -923,26 +923,6 @@
 }
 
 
-/*
-
-=item C<STRING * Parrot_str_copy(PARROT_INTERP, STRING *s)>
-
-Creates and returns a copy of the specified Parrot string.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING *
-Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
-{
-    ASSERT_ARGS(Parrot_str_copy)
-    return Parrot_str_new_COW(interp, s);
-}
-
 
 /*
 


More information about the parrot-commits mailing list