[svn:parrot] r36313 - in branches/pdd28str_part2: include/parrot src/ops src/string
allison at svn.parrot.org
allison at svn.parrot.org
Tue Feb 3 04:40:37 UTC 2009
Author: allison
Date: Tue Feb 3 04:40:36 2009
New Revision: 36313
URL: https://trac.parrot.org/parrot/changeset/36313
Log:
[pdd28str] Renaming string functions for changing charset and encoding.
Modified:
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/src/ops/string.ops
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 04:23:36 2009 (r36312)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Tue Feb 3 04:40:36 2009 (r36313)
@@ -103,7 +103,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-STRING* Parrot_string_trans_charset(PARROT_INTERP,
+STRING* Parrot_str_change_charset(PARROT_INTERP,
ARGMOD_NULLOK(STRING *src),
INTVAL charset_nr,
ARGOUT_NULLOK(STRING *dest))
@@ -114,7 +114,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-STRING* Parrot_string_trans_encoding(PARROT_INTERP,
+STRING* Parrot_str_change_encoding(PARROT_INTERP,
ARGIN_NULLOK(STRING *src),
INTVAL encoding_nr,
ARGOUT_NULLOK(STRING *dest))
@@ -570,9 +570,9 @@
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_Parrot_string_split __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_string_trans_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_change_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_string_trans_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_change_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_str_write_COW __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops Tue Feb 3 04:23:36 2009 (r36312)
+++ branches/pdd28str_part2/src/ops/string.ops Tue Feb 3 04:40:36 2009 (r36313)
@@ -536,12 +536,12 @@
}
op trans_charset(inout STR, in INT) {
- $1 = Parrot_string_trans_charset(interp, $1, $2, NULL);
+ $1 = Parrot_str_change_charset(interp, $1, $2, NULL);
}
op trans_charset(out STR, in STR, in INT) {
STRING *dest = new_string_header(interp, 0);
- $1 = Parrot_string_trans_charset(interp, $2, $3, dest);
+ $1 = Parrot_str_change_charset(interp, $2, $3, dest);
}
@@ -592,12 +592,12 @@
}
op trans_encoding(inout STR, in INT) {
- $1 = Parrot_string_trans_encoding(interp, $1, $2, NULL);
+ $1 = Parrot_str_change_encoding(interp, $1, $2, NULL);
}
op trans_encoding(out STR, in STR, in INT) {
STRING * const dest = new_string_header(interp, 0);
- $1 = Parrot_string_trans_encoding(interp, $2, $3, dest);
+ $1 = Parrot_str_change_encoding(interp, $2, $3, dest);
}
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Tue Feb 3 04:23:36 2009 (r36312)
+++ branches/pdd28str_part2/src/string/api.c Tue Feb 3 04:40:36 2009 (r36313)
@@ -2901,7 +2901,7 @@
/*
-=item C<STRING* Parrot_string_trans_charset>
+=item C<STRING* Parrot_str_change_charset>
If C<dest> == NULL, converts C<src> to the given charset or encoding inplace.
Otherwise returns a copy of C<src> with the charset/encoding in C<dest>.
@@ -2914,10 +2914,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
STRING*
-Parrot_string_trans_charset(PARROT_INTERP, ARGMOD_NULLOK(STRING *src),
+Parrot_str_change_charset(PARROT_INTERP, ARGMOD_NULLOK(STRING *src),
INTVAL charset_nr, ARGOUT_NULLOK(STRING *dest))
{
- ASSERT_ARGS(Parrot_string_trans_charset)
+ ASSERT_ARGS(Parrot_str_change_charset)
const CHARSET *new_charset;
if (!src)
@@ -2959,7 +2959,7 @@
/*
-=item C<STRING* Parrot_string_trans_encoding>
+=item C<STRING* Parrot_str_change_encoding>
If C<dest> == NULL, converts C<src> to the given charset or encoding in place.
Otherwise returns a copy of C<src> with the charset/encoding in C<dest>
@@ -2972,10 +2972,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
STRING*
-Parrot_string_trans_encoding(PARROT_INTERP, ARGIN_NULLOK(STRING *src),
+Parrot_str_change_encoding(PARROT_INTERP, ARGIN_NULLOK(STRING *src),
INTVAL encoding_nr, ARGOUT_NULLOK(STRING *dest))
{
- ASSERT_ARGS(Parrot_string_trans_encoding)
+ ASSERT_ARGS(Parrot_str_change_encoding)
const ENCODING *new_encoding;
if (!src)
More information about the parrot-commits
mailing list