[svn:parrot] r44498 - trunk/src/string/charset
coke at svn.parrot.org
coke at svn.parrot.org
Fri Feb 26 16:52:12 UTC 2010
Author: coke
Date: Fri Feb 26 16:52:11 2010
New Revision: 44498
URL: https://trac.parrot.org/parrot/changeset/44498
Log:
Only reset the iterator when we have to.
mls++ for the gedankenpatch.
Modified:
trunk/src/string/charset/ascii.c
Modified: trunk/src/string/charset/ascii.c
==============================================================================
--- trunk/src/string/charset/ascii.c Fri Feb 26 16:24:17 2010 (r44497)
+++ trunk/src/string/charset/ascii.c Fri Feb 26 16:52:11 2010 (r44498)
@@ -619,9 +619,14 @@
}
else {
len = search->strlen;
+ ++offs;
+ ++next_pos;
+ if (offs != next_pos) {
+ src_iter.set_position(interp, &src_iter, next_pos);
+ offs = next_pos;
+ }
+
found_at = -1;
- offs = ++next_pos;
- src_iter.set_position(interp, &src_iter, offs);
search_iter.set_position(interp, &search_iter, 0);
}
}
More information about the parrot-commits
mailing list