[svn:parrot] r47025 - trunk/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed May 26 20:26:42 UTC 2010
Author: NotFound
Date: Wed May 26 20:26:42 2010
New Revision: 47025
URL: https://trac.parrot.org/parrot/changeset/47025
Log:
change misuses of str_byte_length to str_length
Modified:
trunk/src/pmc/string.pmc
Modified: trunk/src/pmc/string.pmc
==============================================================================
--- trunk/src/pmc/string.pmc Wed May 26 18:34:34 2010 (r47024)
+++ trunk/src/pmc/string.pmc Wed May 26 20:26:42 2010 (r47025)
@@ -406,7 +406,7 @@
const INTVAL k = VTABLE_get_integer(INTERP, key);
GET_ATTR_str_val(INTERP, SELF, str_val);
- n = Parrot_str_byte_length(INTERP, str_val);
+ n = Parrot_str_length(INTERP, str_val);
return (INTVAL)((k >= 0 && k <= n) || (k < 0 && -k <= n));
}
@@ -470,7 +470,7 @@
VTABLE void set_string_keyed_int(INTVAL pos, STRING * const value) {
STRING *str_val;
- const INTVAL len = Parrot_str_byte_length(INTERP, value);
+ const INTVAL len = Parrot_str_length(INTERP, value);
GET_ATTR_str_val(INTERP, SELF, str_val);
str_val = Parrot_str_replace(INTERP, str_val, pos, len, value);
SET_ATTR_str_val(INTERP, SELF, str_val);
@@ -506,8 +506,8 @@
*/
METHOD replace(STRING *orig, STRING *_new) {
- const INTVAL old_len = Parrot_str_byte_length(INTERP, orig);
- const INTVAL new_len = Parrot_str_byte_length(INTERP, _new);
+ const INTVAL old_len = Parrot_str_length(INTERP, orig);
+ const INTVAL new_len = Parrot_str_length(INTERP, _new);
STRING * s = VTABLE_get_string(INTERP, SELF);
INTVAL i = 0;
@@ -607,7 +607,7 @@
VTABLE INTVAL elements() {
STRING *str_val;
GET_ATTR_str_val(INTERP, SELF, str_val);
- return Parrot_str_byte_length(INTERP, str_val);
+ return Parrot_str_length(INTERP, str_val);
}
VTABLE PMC *get_iter() {
@@ -691,7 +691,7 @@
INTVAL i;
STRING *dest;
- const INTVAL len = Parrot_str_byte_length(INTERP, src);
+ const INTVAL len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(STRING src);
@@ -729,7 +729,7 @@
METHOD is_integer(STRING *src) {
INTVAL i;
unsigned char *p;
- const INTVAL len = Parrot_str_byte_length(INTERP, src);
+ const INTVAL len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(INTVAL 0);
@@ -787,7 +787,7 @@
if (start < 0)
RETURN(INTVAL res);
- len = Parrot_str_byte_length(INTERP, src);
+ len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(INTVAL res);
@@ -795,7 +795,7 @@
if (start >= (INTVAL)len)
RETURN(INTVAL res);
- if (!Parrot_str_byte_length(INTERP, substring))
+ if (!Parrot_str_length(INTERP, substring))
RETURN(INTVAL res);
res = CHARSET_RINDEX(INTERP, src, substring, (UINTVAL)start);
More information about the parrot-commits
mailing list