Author: allison Date: Wed Jan 28 17:44:19 2009 New Revision: 36128 Modified: branches/pdd28str_part2/include/parrot/string_funcs.h branches/pdd28str_part2/src/string/api.c branches/pdd28str_part2/src/string/charset/iso-8859-1.c
Log: [pdd28str] Name change for 'Parrot_str_write_COW'. Modified: branches/pdd28str_part2/include/parrot/string_funcs.h ============================================================================== --- branches/pdd28str_part2/include/parrot/string_funcs.h (original) +++ branches/pdd28str_part2/include/parrot/string_funcs.h Wed Jan 28 17:44:19 2009 @@ -21,7 +21,7 @@ #define string_from_literal(i, s) string_from_cstring((i), (s), (sizeof (s)-1)) #define Parrot_unCOW_string(i, s) PObj_COW_TEST((s)) ? \ - Parrot_unmake_COW((i), (s)), (s) : (s) + Parrot_str_write_COW((i), (s)), (s) : (s) /* HEADERIZER BEGIN: src/string/api.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -122,7 +122,7 @@ FUNC_MODIFIES(*dest); PARROT_EXPORT -void Parrot_unmake_COW(PARROT_INTERP, ARGMOD(STRING *s)) +void Parrot_str_write_COW(PARROT_INTERP, ARGMOD(STRING *s)) __attribute__nonnull__(1) __attribute__nonnull__(2) FUNC_MODIFIES(*s); @@ -584,7 +584,7 @@ PARROT_ASSERT_ARG(interp) #define ASSERT_ARGS_Parrot_string_trans_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) -#define ASSERT_ARGS_Parrot_unmake_COW __attribute__unused__ int _ASSERT_ARGS_CHECK = \ +#define ASSERT_ARGS_Parrot_str_write_COW __attribute__unused__ int _ASSERT_ARGS_CHECK = \ PARROT_ASSERT_ARG(interp) \ || PARROT_ASSERT_ARG(s) #define ASSERT_ARGS_string_append __attribute__unused__ int _ASSERT_ARGS_CHECK = \ Modified: branches/pdd28str_part2/src/string/api.c ============================================================================== --- branches/pdd28str_part2/src/string/api.c (original) +++ branches/pdd28str_part2/src/string/api.c Wed Jan 28 17:44:19 2009 @@ -69,7 +69,7 @@ /* -=item C<void Parrot_unmake_COW> +=item C<void Parrot_str_write_COW> If the specified Parrot string is copy-on-write then the memory is copied over and the copy-on-write flag is cleared. @@ -80,9 +80,9 @@ PARROT_EXPORT void -Parrot_unmake_COW(PARROT_INTERP, ARGMOD(STRING *s)) +Parrot_str_write_COW(PARROT_INTERP, ARGMOD(STRING *s)) { - ASSERT_ARGS(Parrot_unmake_COW) + ASSERT_ARGS(Parrot_str_write_COW) /* COW_FLAG | constant_FLAG | external_FLAG) */ if (PObj_is_cowed_TESTALL(s)) { @@ -160,7 +160,7 @@ * is fixed correctly. */ if (n_interpreters > 1 && PObj_is_movable_TESTALL(s) && !Parrot_in_memory_pool(interp, PObj_bufstart(s))) { - Parrot_unmake_COW(interp, d); + Parrot_str_write_COW(interp, d); Parrot_io_eprintf(interp, "cross-interpreter copy of " "relocatable string '%Ss' into tid %d\n", d, @@ -825,7 +825,7 @@ string_grow(PARROT_INTERP, ARGMOD(STRING *s), UINTVAL addlen) { ASSERT_ARGS(string_grow) - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); /* Don't check buflen, if we are here, we already checked. */ Parrot_reallocate_string(interp, @@ -1280,7 +1280,7 @@ && length == 1 && rep->strlen == 1) { if (PObj_is_cowed_TESTALL(src)) - Parrot_unmake_COW(interp, src); + Parrot_str_write_COW(interp, src); ((char *)src->strstart)[offset] = ((char *)rep->strstart)[0]; @@ -1345,7 +1345,7 @@ if (diff >= 0 || ((INTVAL)src->bufused - (INTVAL)PObj_buflen(src)) <= diff) { - Parrot_unmake_COW(interp, src); + Parrot_str_write_COW(interp, src); if (diff != 0) { mem_sys_memmove((char *)src->strstart + start_byte + rep->bufused, @@ -1573,7 +1573,7 @@ else if ((*s)->strlen < len) string_grow(interp, *s, (UINTVAL)(len - (*s)->strlen)); else if (PObj_is_cowed_TESTALL(*s)) - Parrot_unmake_COW(interp, *s); + Parrot_str_write_COW(interp, *s); } @@ -2296,7 +2296,7 @@ * not work for these * so probably only sysmem should be tested */ - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); size = PObj_buflen(s); memory = (char *)mem_sys_allocate(size); @@ -2334,7 +2334,7 @@ if (!PObj_sysmem_TEST(s)) return; - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); size = PObj_buflen(s); /* We need a handle on the fixed memory so we can get rid of it later */ @@ -2705,7 +2705,7 @@ "Can't upcase NULL string"); } else { - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); CHARSET_UPCASE(interp, s); } } @@ -2757,7 +2757,7 @@ * * conversion to utf16, with doubling the buffer * * possibly one more reallocation in downcase */ - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); CHARSET_DOWNCASE(interp, s); } @@ -2802,7 +2802,7 @@ string_titlecase_inplace(PARROT_INTERP, ARGMOD(STRING *s)) { ASSERT_ARGS(string_titlecase_inplace) - Parrot_unmake_COW(interp, s); + Parrot_str_write_COW(interp, s); CHARSET_TITLECASE(interp, s); } @@ -2995,7 +2995,7 @@ if (new_charset == src->charset) return src; - Parrot_unmake_COW(interp, src); + Parrot_str_write_COW(interp, src); } return new_charset->to_charset(interp, src, dest); @@ -3047,7 +3047,7 @@ if (new_encoding == src->encoding) return src; - Parrot_unmake_COW(interp, src); + Parrot_str_write_COW(interp, src); } return new_encoding->to_encoding(interp, src, dest); Modified: branches/pdd28str_part2/src/string/charset/iso-8859-1.c ============================================================================== --- branches/pdd28str_part2/src/string/charset/iso-8859-1.c (original) +++ branches/pdd28str_part2/src/string/charset/iso-8859-1.c Wed Jan 28 17:44:19 2009 @@ -371,7 +371,7 @@ if (!source_string->strlen) return; - Parrot_unmake_COW(interp, source_string); + Parrot_str_write_COW(interp, source_string); buffer = (unsigned char *)source_string->strstart; for (offset = 0; offset < source_string->strlen; offset++) { unsigned int c = buffer[offset]; /* XXX use encoding ? */ @@ -402,7 +402,7 @@ UINTVAL offset; unsigned char *buffer; - Parrot_unmake_COW(interp, source_string); + Parrot_str_write_COW(interp, source_string); buffer = (unsigned char *)source_string->strstart; for (offset = 0; offset < source_string->strlen; offset++) { unsigned int c = buffer[offset]; @@ -437,7 +437,7 @@ if (!source_string->strlen) return; - Parrot_unmake_COW(interp, source_string); + Parrot_str_write_COW(interp, source_string); buffer = (unsigned char *)source_string->strstart; c = buffer[0]; if (c >= 0xe0 && c != 0xf7) @@ -475,7 +475,7 @@ unsigned char *buffer; unsigned int c; - Parrot_unmake_COW(interp, source_string); + Parrot_str_write_COW(interp, source_string); buffer = (unsigned char *)source_string->strstart; c = buffer[0]; if (c >= 0xe0 && c != 0xf7) @@ -505,7 +505,7 @@ unsigned char *buffer; unsigned int c; - Parrot_unmake_COW(interp, source_string); + Parrot_str_write_COW(interp, source_string); buffer = (unsigned char *)source_string->strstart; c = buffer[0]; if (c >= 0xc0 && c != 0xd7 && c <= 0xde)