Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r61148:f5a9767fd636 Date: 2013-02-12 16:37 -0500 http://bitbucket.org/pypy/pypy/changeset/f5a9767fd636/
Log: backout ee04c61f776b to fix MemoryErrors in string tests diff --git a/rpython/rlib/rstring.py b/rpython/rlib/rstring.py --- a/rpython/rlib/rstring.py +++ b/rpython/rlib/rstring.py @@ -3,7 +3,6 @@ from rpython.annotator.model import (SomeObject, SomeString, s_None, SomeChar, SomeInteger, SomeUnicodeCodePoint, SomeUnicodeString, SomePtr, SomePBC) -from rpython.rlib.objectmodel import newlist_hint from rpython.rlib.rarithmetic import ovfcheck from rpython.rtyper.extregistry import ExtRegistryEntry from rpython.tool.pairtype import pairtype @@ -15,10 +14,7 @@ if bylen == 0: raise ValueError("empty separator") - if maxsplit > 0: - res = newlist_hint(maxsplit) - else: - res = [] + res = [] start = 0 while maxsplit != 0: next = value.find(by, start) @@ -31,12 +27,8 @@ res.append(value[start:len(value)]) return res - def rsplit(value, by, maxsplit=-1): - if maxsplit > 0: - res = newlist_hint(maxsplit) - else: - res = [] + res = [] end = len(value) bylen = len(by) if bylen == 0: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit