[pypy-commit] pypy refactor-str-types: Fix.
Manuel Jacob
noreply at buildbot.pypy.org
Thu Jul 25 20:00:12 CEST 2013
Author: Manuel Jacob
Branch: refactor-str-types
Changeset: r65658:9d73701fdecb
Date: 2013-07-25 19:58 +0200
http://bitbucket.org/pypy/pypy/changeset/9d73701fdecb/
Log: Fix.
diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -47,7 +47,7 @@
_builder = StringBuilder
def _newlist_unwrapped(self, space, res):
- return space.wrap([W_BytearrayObject(list(i)) for i in res])
+ return space.newlist([W_BytearrayObject(list(i)) for i in res])
def _isupper(self, ch):
return ch.isupper()
diff --git a/pypy/objspace/std/stringmethods.py b/pypy/objspace/std/stringmethods.py
--- a/pypy/objspace/std/stringmethods.py
+++ b/pypy/objspace/std/stringmethods.py
@@ -490,8 +490,8 @@
if isinstance(self, W_BytearrayObject):
w_sub = self._new(sub)
return space.newtuple(
- [self._sliced(space, value, 0, pos, value), w_sub,
- self._sliced(space, value, pos+len(sub), len(value), value)])
+ [self._sliced(space, value, 0, pos, self), w_sub,
+ self._sliced(space, value, pos+len(sub), len(value), self)])
@specialize.argtype(0)
def descr_rpartition(self, space, w_sub):
@@ -508,8 +508,8 @@
if isinstance(self, W_BytearrayObject):
w_sub = self._new(sub)
return space.newtuple(
- [self._sliced(space, value, 0, pos, value), w_sub,
- self._sliced(space, value, pos+len(sub), len(value), value)])
+ [self._sliced(space, value, 0, pos, self), w_sub,
+ self._sliced(space, value, pos+len(sub), len(value), self)])
@unwrap_spec(count=int)
@specialize.argtype(0)
More information about the pypy-commit
mailing list