Index: src/string/api.c =================================================================== --- src/string/api.c (revision 46399) +++ src/string/api.c (working copy) @@ -2845,8 +2845,8 @@ /* -=item C +=item C Converts C to the given charset or encoding and returns the result as a new string. @@ -2859,7 +2859,7 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL STRING* -Parrot_str_change_charset(PARROT_INTERP, ARGMOD_NULLOK(STRING *src), +Parrot_str_change_charset(PARROT_INTERP, ARGIN_NULLOK(const STRING *src), INTVAL charset_nr) { ASSERT_ARGS(Parrot_str_change_charset) @@ -2875,7 +2875,7 @@ "charset #%d not found", (int) charset_nr); if (new_charset == src->charset) - return src; + return (STRING *)src; return new_charset->to_charset(interp, src); } @@ -2883,8 +2883,8 @@ /* -=item C +=item C Converts C to the given charset or encoding and returns the result as a new string. @@ -2897,7 +2897,7 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL STRING* -Parrot_str_change_encoding(PARROT_INTERP, ARGMOD_NULLOK(STRING *src), +Parrot_str_change_encoding(PARROT_INTERP, ARGIN_NULLOK(const STRING *src), INTVAL encoding_nr) { ASSERT_ARGS(Parrot_str_change_encoding) @@ -2913,7 +2913,7 @@ "encoding #%d not found", (int) encoding_nr); if (new_encoding == src->encoding) - return src; + return (STRING *)src; return new_encoding->to_encoding(interp, src); } @@ -3070,7 +3070,8 @@ /* -=item C +=item C Splits the string C at the delimiter C, returning a C, or his mapped type in the current HLL, of results. @@ -3085,7 +3086,7 @@ PARROT_CAN_RETURN_NULL PMC* Parrot_str_split(PARROT_INTERP, - ARGIN_NULLOK(const STRING *delim), ARGIN_NULLOK(STRING *str)) + ARGIN_NULLOK(const STRING *delim), ARGIN_NULLOK(const STRING *str)) { ASSERT_ARGS(Parrot_str_split) PMC *res; Index: include/parrot/string_funcs.h =================================================================== --- include/parrot/string_funcs.h (revision 46399) +++ include/parrot/string_funcs.h (working copy) @@ -66,7 +66,7 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL STRING* Parrot_str_change_charset(PARROT_INTERP, - ARGMOD_NULLOK(STRING *src), + ARGIN_NULLOK(const STRING *src), INTVAL charset_nr) __attribute__nonnull__(1) FUNC_MODIFIES(*src); @@ -75,7 +75,7 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL STRING* Parrot_str_change_encoding(PARROT_INTERP, - ARGMOD_NULLOK(STRING *src), + ARGIN_NULLOK(const STRING *src), INTVAL encoding_nr) __attribute__nonnull__(1) FUNC_MODIFIES(*src); @@ -322,7 +322,7 @@ PARROT_CAN_RETURN_NULL PMC* Parrot_str_split(PARROT_INTERP, ARGIN_NULLOK(const STRING *delim), - ARGIN_NULLOK(STRING *str)) + ARGIN_NULLOK(const STRING *str)) __attribute__nonnull__(1); PARROT_EXPORT