[svn:parrot] r36253 - in branches/pdd28str_part2: docs/dev include/parrot languages/lua/src/pmc src src/ops src/pmc src/string
allison at svn.parrot.org
allison at svn.parrot.org
Sun Feb 1 20:05:16 UTC 2009
Author: allison
Date: Sun Feb 1 20:05:16 2009
New Revision: 36253
URL: https://trac.parrot.org/parrot/changeset/36253
Log:
[pdd28str] Renaming 'string_str_index' to 'Parrot_str_find_index'.
Modified:
branches/pdd28str_part2/docs/dev/c_functions.pod
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc
branches/pdd28str_part2/src/oo.c
branches/pdd28str_part2/src/ops/string.ops
branches/pdd28str_part2/src/pmc/codestring.pmc
branches/pdd28str_part2/src/pmc/default.pmc
branches/pdd28str_part2/src/pmc/namespace.pmc
branches/pdd28str_part2/src/pmc/string.pmc
branches/pdd28str_part2/src/pmc/stringhandle.pmc
branches/pdd28str_part2/src/string/api.c
Modified: branches/pdd28str_part2/docs/dev/c_functions.pod
==============================================================================
--- branches/pdd28str_part2/docs/dev/c_functions.pod Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/docs/dev/c_functions.pod Sun Feb 1 20:05:16 2009 (r36253)
@@ -195,14 +195,14 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
- string_str_index(PARROT_INTERP, NOTNULL(const STRING *s),
+ Parrot_str_find_index(PARROT_INTERP, NOTNULL(const STRING *s),
NOTNULL(const STRING *s2), INTVAL start)
-C<string_str_index> is part of the Parrot API, and returns an INTVAL. The
+C<Parrot_str_find_index> is part of the Parrot API, and returns an INTVAL. The
interpreter is used somewhere in the function. String C<s> and C<s2>
cannot be NULL. If the calling function ignores the return value,
-it's an error, because you'd never want to call C<string_str_index()>
+it's an error, because you'd never want to call C<Parrot_str_find_index()>
without wanting to know its value.
PARROT_EXPORT
Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 20:05:16 2009 (r36253)
@@ -451,7 +451,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
-INTVAL string_str_index(PARROT_INTERP,
+INTVAL Parrot_str_find_index(PARROT_INTERP,
ARGIN(const STRING *s),
ARGIN(const STRING *s2),
INTVAL start)
@@ -699,7 +699,7 @@
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(delim) \
|| PARROT_ASSERT_ARG(str)
-#define ASSERT_ARGS_string_str_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_find_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s) \
|| PARROT_ASSERT_ARG(s2)
Modified: branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -342,10 +342,10 @@
int i;
if (mode) {
- mark_key = string_str_index(interp, mode,
+ mark_key = Parrot_str_find_index(interp, mode,
Parrot_str_new_constant(interp, "k"), 0) < 0;
- mark_val = string_str_index(interp, mode,
+ mark_val = Parrot_str_find_index(interp, mode,
Parrot_str_new_constant(interp, "v"), 0) < 0;
}
Modified: branches/pdd28str_part2/src/oo.c
==============================================================================
--- branches/pdd28str_part2/src/oo.c Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/oo.c Sun Feb 1 20:05:16 2009 (r36253)
@@ -136,7 +136,7 @@
STRING *vtable_name = Parrot_str_new(interp, meth_c, 0);
/* Strip leading underscores in the vtable name */
- if (string_str_index(interp, vtable_name, CONST_STRING(interp, "__"), 0) == 0) {
+ if (Parrot_str_find_index(interp, vtable_name, CONST_STRING(interp, "__"), 0) == 0) {
vtable_name = string_substr(interp, vtable_name, 2,
Parrot_str_byte_length(interp, vtable_name) - 2, NULL, 0);
}
Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/ops/string.ops Sun Feb 1 20:05:16 2009 (r36253)
@@ -296,11 +296,11 @@
=cut
inline op index(out INT, in STR, in STR) :base_core {
- $1 = ($2 && $3) ? string_str_index(interp, $2, $3, 0) : -1;
+ $1 = ($2 && $3) ? Parrot_str_find_index(interp, $2, $3, 0) : -1;
}
inline op index(out INT, in STR, in STR, in INT) :base_core {
- $1 = ($2 && $3) ? string_str_index(interp, $2, $3, $4) : -1;
+ $1 = ($2 && $3) ? Parrot_str_find_index(interp, $2, $3, $4) : -1;
}
Modified: branches/pdd28str_part2/src/pmc/codestring.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -73,7 +73,7 @@
while (pos >= 0) {
pos += replen;
- pos = string_str_index(INTERP, fmt, percent, pos);
+ pos = Parrot_str_find_index(INTERP, fmt, percent, pos);
if (pos < 0) break;
key = string_substr(INTERP, fmt, pos+1, 1, &key, 0);
@@ -177,7 +177,7 @@
escaped_str = Parrot_str_concat(INTERP, quote, escaped_str, 1);
escaped_str = Parrot_str_concat(INTERP, escaped_str, quote, 1);
- x_pos = string_str_index(INTERP, escaped_str, x, 0);
+ x_pos = Parrot_str_find_index(INTERP, escaped_str, x, 0);
if (x_pos != -1) {
is_unicode = 1;
@@ -185,7 +185,7 @@
else
{
STRING *u = CONST_STRING(INTERP, "\\u");
- INTVAL u_pos = string_str_index(INTERP, escaped_str, u, 0);
+ INTVAL u_pos = Parrot_str_find_index(INTERP, escaped_str, u, 0);
if (u_pos != -1)
is_unicode = 1;
}
Modified: branches/pdd28str_part2/src/pmc/default.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/default.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/pmc/default.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -237,7 +237,7 @@
do {
INTVAL len;
- INTVAL idx = string_str_index(interp, what, method, (INTVAL)pos);
+ INTVAL idx = Parrot_str_find_index(interp, what, method, (INTVAL)pos);
if (idx < 0)
return 0;
Modified: branches/pdd28str_part2/src/pmc/namespace.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/namespace.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/pmc/namespace.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -61,7 +61,7 @@
/* Handle vtable methods with two underscores at the start. */
if (sub->vtable_index == -1) {
- if (string_str_index(interp, key, CONST_STRING(interp, "__"), 0) == 0) {
+ if (Parrot_str_find_index(interp, key, CONST_STRING(interp, "__"), 0) == 0) {
STRING * const meth_name = string_substr(interp, key, 2,
(INTVAL)(Parrot_str_byte_length(interp, key) - 2), NULL, 0);
sub->vtable_index =
Modified: branches/pdd28str_part2/src/pmc/string.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/string.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/pmc/string.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -652,7 +652,7 @@
STRING * const s = VTABLE_get_string(INTERP, SELF);
INTVAL i = 0;
- while (-1 != (i = string_str_index(INTERP, s, orig, i))) {
+ while (-1 != (i = Parrot_str_find_index(INTERP, s, orig, i))) {
(void)string_replace(INTERP, s, i, old_len, _new, NULL);
i += new_len;
}
Modified: branches/pdd28str_part2/src/pmc/stringhandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/stringhandle.pmc Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/pmc/stringhandle.pmc Sun Feb 1 20:05:16 2009 (r36253)
@@ -305,7 +305,7 @@
orig_length = Parrot_str_byte_length(INTERP, string_result);
GET_ATTR_read_offset(INTERP, SELF, offset);
- newline_pos = string_str_index(INTERP, string_result, CONST_STRING(INTERP, "\n"), offset);
+ newline_pos = Parrot_str_find_index(INTERP, string_result, CONST_STRING(INTERP, "\n"), offset);
/* No newline found, read the rest of the string. */
if (newline_pos == -1)
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Sun Feb 1 19:48:28 2009 (r36252)
+++ branches/pdd28str_part2/src/string/api.c Sun Feb 1 20:05:16 2009 (r36253)
@@ -889,7 +889,7 @@
/*
-=item C<INTVAL string_str_index>
+=item C<INTVAL Parrot_str_find_index>
Returns the character position of the second Parrot string in the first at or
after C<start>. The return value is a (0 based) offset in characters, not
@@ -902,10 +902,10 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-string_str_index(PARROT_INTERP, ARGIN(const STRING *s),
+Parrot_str_find_index(PARROT_INTERP, ARGIN(const STRING *s),
ARGIN(const STRING *s2), INTVAL start)
{
- ASSERT_ARGS(string_str_index)
+ ASSERT_ARGS(Parrot_str_find_index)
STRING *src, *search;
UINTVAL len;
DECL_CONST_CAST;
@@ -3162,7 +3162,7 @@
return res;
}
- pe = string_str_index(interp, str, delim, 0);
+ pe = Parrot_str_find_index(interp, str, delim, 0);
if (pe < 0) {
VTABLE_push_string(interp, res, str);
@@ -3181,7 +3181,7 @@
if (ps > slen)
break;
- pe = string_str_index(interp, str, delim, ps);
+ pe = Parrot_str_find_index(interp, str, delim, ps);
if (pe < 0)
pe = slen;
More information about the parrot-commits
mailing list