[svn:parrot] r36239 - in branches/pdd28str_part2: include/parrot src src/io src/pmc src/string tools/build
allison at svn.parrot.org
allison at svn.parrot.org
Sun Feb 1 08:36:03 UTC 2009
Author: allison
Date: Sun Feb 1 08:36:02 2009
New Revision: 36239
URL: https://trac.parrot.org/parrot/changeset/36239
Log:
[pdd28str] Renaming 'Parrot_str_indexed'.
Modified:
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/src/io/filehandle.c
branches/pdd28str_part2/src/library.c
branches/pdd28str_part2/src/multidispatch.c
branches/pdd28str_part2/src/pmc/codestring.pmc
branches/pdd28str_part2/src/pmc/default.pmc
branches/pdd28str_part2/src/pmc_freeze.c
branches/pdd28str_part2/src/string/api.c
branches/pdd28str_part2/tools/build/nativecall.pl
Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 08:36:02 2009 (r36239)
@@ -320,7 +320,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
-INTVAL string_index(PARROT_INTERP, ARGIN(const STRING *s), UINTVAL idx)
+INTVAL Parrot_str_indexed(PARROT_INTERP, ARGIN(const STRING *s), UINTVAL idx)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -651,7 +651,7 @@
#define ASSERT_ARGS_string_increment __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
-#define ASSERT_ARGS_string_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_indexed __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_Parrot_str_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: branches/pdd28str_part2/src/io/filehandle.c
==============================================================================
--- branches/pdd28str_part2/src/io/filehandle.c Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/io/filehandle.c Sun Feb 1 08:36:02 2009 (r36239)
@@ -51,7 +51,7 @@
mode_len = Parrot_str_byte_length(interp, mode_str);
for (i = 0; i < mode_len; ++i) {
- INTVAL s = string_index(interp, mode_str, i);
+ INTVAL s = Parrot_str_indexed(interp, mode_str, i);
switch (s) {
case 'r':
flags |= PIO_F_READ;
Modified: branches/pdd28str_part2/src/library.c
==============================================================================
--- branches/pdd28str_part2/src/library.c Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/library.c Sun Feb 1 08:36:02 2009 (r36239)
@@ -399,8 +399,8 @@
STRING * const path_separator_string = string_chr(interp, path_separator);
/* make sure the path has a trailing slash before appending the file */
- if (string_index(interp, path , path->strlen - 1)
- != string_index(interp, path_separator_string, 0))
+ if (Parrot_str_indexed(interp, path , path->strlen - 1)
+ != Parrot_str_indexed(interp, path_separator_string, 0))
path = Parrot_str_append(interp, path , path_separator_string);
return path;
Modified: branches/pdd28str_part2/src/multidispatch.c
==============================================================================
--- branches/pdd28str_part2/src/multidispatch.c Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/multidispatch.c Sun Feb 1 08:36:02 2009 (r36239)
@@ -316,7 +316,7 @@
/* Process the varargs list */
for (i = 0; i < sig_len; ++i) {
- const INTVAL type = string_index(interp, string_sig, i);
+ const INTVAL type = Parrot_str_indexed(interp, string_sig, i);
/* Only create the returns array if it's needed */
if (in_return_sig && PMC_IS_NULL(returns)) {
@@ -843,7 +843,7 @@
/* First calculate the number of arguments participating in MMD */
for (i = 0; i < sig_len; ++i) {
- INTVAL type = string_index(interp, string_sig, i);
+ INTVAL type = Parrot_str_indexed(interp, string_sig, i);
if (type == '-')
break;
@@ -853,7 +853,7 @@
VTABLE_set_integer_native(interp, type_tuple, tuple_size);
for (i = 0; i < sig_len; ++i) {
- INTVAL type = string_index(interp, string_sig, i);
+ INTVAL type = Parrot_str_indexed(interp, string_sig, i);
if (args_ended)
break;
@@ -873,7 +873,7 @@
break;
case 'P':
{
- INTVAL type_lookahead = string_index(interp, string_sig, (i + 1));
+ INTVAL type_lookahead = Parrot_str_indexed(interp, string_sig, (i + 1));
if (type_lookahead == 'i') {
if (i != 0)
Parrot_ex_throw_from_c_args(interp, NULL,
Modified: branches/pdd28str_part2/src/pmc/codestring.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 08:36:02 2009 (r36239)
@@ -113,7 +113,7 @@
}
/* Add a newline if necessary */
- if ('\n' != string_index(INTERP, fmt, Parrot_str_byte_length(interp, fmt) - 1))
+ if ('\n' != Parrot_str_indexed(INTERP, fmt, Parrot_str_byte_length(interp, fmt) - 1))
fmt = Parrot_str_concat(INTERP, fmt, newline, 0);
S1 = Parrot_str_concat(INTERP, SELF.get_string(), fmt, 0);
Modified: branches/pdd28str_part2/src/pmc/default.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/default.pmc Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/pmc/default.pmc Sun Feb 1 08:36:02 2009 (r36239)
@@ -249,12 +249,12 @@
len = Parrot_str_byte_length(interp, method);
- if (pos && string_index(interp, what, pos - 1) != 32) {
+ if (pos && Parrot_str_indexed(interp, what, pos - 1) != 32) {
pos += len;
continue;
}
- if (pos + len < length && string_index(interp, what, pos + len) != 32) {
+ if (pos + len < length && Parrot_str_indexed(interp, what, pos + len) != 32) {
pos += len;
continue;
}
Modified: branches/pdd28str_part2/src/pmc_freeze.c
==============================================================================
--- branches/pdd28str_part2/src/pmc_freeze.c Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/pmc_freeze.c Sun Feb 1 08:36:02 2009 (r36239)
@@ -564,7 +564,7 @@
/* temporary--write out in UTF-8 */
for (idx = 0; idx < length; ++idx) {
- *cursor++ = (unsigned char)string_index(interp, s, idx);
+ *cursor++ = (unsigned char)Parrot_str_indexed(interp, s, idx);
}
str_append(interp, io->image, buffer, cursor - buffer);
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/src/string/api.c Sun Feb 1 08:36:02 2009 (r36239)
@@ -863,7 +863,7 @@
/*
-=item C<INTVAL string_index>
+=item C<INTVAL Parrot_str_indexed>
Returns the character (or glyph, depending upon the string's encoding). This
abstracts the process of finding the Nth character in a (possibly Unicode or
@@ -879,9 +879,9 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-string_index(PARROT_INTERP, ARGIN(const STRING *s), UINTVAL idx)
+Parrot_str_indexed(PARROT_INTERP, ARGIN(const STRING *s), UINTVAL idx)
{
- ASSERT_ARGS(string_index)
+ ASSERT_ARGS(Parrot_str_indexed)
saneify_string(s);
return (INTVAL)CHARSET_GET_CODEPOINT(interp, s, idx);
}
@@ -968,7 +968,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ORD_OUT_OF_STRING,
"Cannot get character past end of string");
- return string_index(interp, s, true_index);
+ return Parrot_str_indexed(interp, s, true_index);
}
@@ -1978,7 +1978,7 @@
return 0;
if (len == 1) {
- const UINTVAL c = string_index(interp, s, 0);
+ const UINTVAL c = Parrot_str_indexed(interp, s, 0);
/* relying on character literals being interpreted as ASCII--may
not be correct on EBCDIC systems. use numeric value instead? */
Modified: branches/pdd28str_part2/tools/build/nativecall.pl
==============================================================================
--- branches/pdd28str_part2/tools/build/nativecall.pl Sun Feb 1 08:02:55 2009 (r36238)
+++ branches/pdd28str_part2/tools/build/nativecall.pl Sun Feb 1 08:36:02 2009 (r36239)
@@ -534,7 +534,7 @@
if (0 == signature_len)
return F2DPTR(pcf_v_);
/* remove deprecated void argument 'v' character */
- if (2 == signature_len && 'v' == string_index(interp, signature, 1)) {
+ if (2 == signature_len && 'v' == Parrot_str_indexed(interp, signature, 1)) {
Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "function signature argument character 'v' ignored");
string_chopn_inplace(interp, signature, 1);
signature_len = Parrot_str_byte_length(interp, signature);
More information about the parrot-commits
mailing list