[svn:parrot] r36232 - in branches/pdd28str_part2: include/parrot src/string
allison at svn.parrot.org
allison at svn.parrot.org
Sun Feb 1 06:28:57 UTC 2009
Author: allison
Date: Sun Feb 1 06:28:56 2009
New Revision: 36232
URL: https://trac.parrot.org/parrot/changeset/36232
Log:
[pdd28str] Renaming "Parrot_str_resize".
Modified:
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/src/string/api.c
Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 06:23:45 2009 (r36231)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 06:28:56 2009 (r36232)
@@ -300,7 +300,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-STRING * string_grow(PARROT_INTERP, ARGMOD(STRING *s), UINTVAL addlen)
+STRING * Parrot_str_resize(PARROT_INTERP, ARGMOD(STRING *s), UINTVAL addlen)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*s);
@@ -643,7 +643,7 @@
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_string_from_num __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_grow __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_resize __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_string_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Sun Feb 1 06:23:45 2009 (r36231)
+++ branches/pdd28str_part2/src/string/api.c Sun Feb 1 06:28:56 2009 (r36232)
@@ -811,7 +811,7 @@
/*
-=item C<STRING * string_grow>
+=item C<STRING * Parrot_str_resize>
Grows the Parrot string's buffer by the specified number of characters.
@@ -822,9 +822,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
STRING *
-string_grow(PARROT_INTERP, ARGMOD(STRING *s), UINTVAL addlen)
+Parrot_str_resize(PARROT_INTERP, ARGMOD(STRING *s), UINTVAL addlen)
{
- ASSERT_ARGS(string_grow)
+ ASSERT_ARGS(Parrot_str_resize)
Parrot_str_write_COW(interp, s);
/* Don't check buflen, if we are here, we already checked. */
@@ -1365,7 +1365,7 @@
else {
/* diff is negative here, make it positive */
diff = -(diff);
- string_grow(interp, src, (UINTVAL)diff);
+ Parrot_str_resize(interp, src, (UINTVAL)diff);
/* Move the end of old string that isn't replaced to new offset first */
mem_sys_memmove((char *)src->strstart + end_byte + diff,
@@ -1571,7 +1571,7 @@
if (!*s)
*s = Parrot_str_new_noinit(interp, representation, len);
else if ((*s)->strlen < len)
- string_grow(interp, *s, (UINTVAL)(len - (*s)->strlen));
+ Parrot_str_resize(interp, *s, (UINTVAL)(len - (*s)->strlen));
else if (PObj_is_cowed_TESTALL(*s))
Parrot_str_write_COW(interp, *s);
}
More information about the parrot-commits
mailing list