Author: Christian Tismer <tis...@stackless.com> Branch: win64_gborg Changeset: r49275:663b703f5738 Date: 2011-11-10 13:53 +0100 http://bitbucket.org/pypy/pypy/changeset/663b703f5738/
Log: Merge with default 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 @@ -282,15 +282,12 @@ def str__Bytearray(space, w_bytearray): return space.wrap(''.join(w_bytearray.data)) -def _convert_idx_params(space, w_self, w_start, w_stop): - length = len(w_self.data) +def str_count__Bytearray_Int_ANY_ANY(space, w_bytearray, w_char, w_start, w_stop): + char = w_char.intval + bytearray = w_bytearray.data + length = len(bytearray) start, stop = slicetype.unwrap_start_stop( space, length, w_start, w_stop, False) - return start, stop, length - -def str_count__Bytearray_Int_ANY_ANY(space, w_bytearray, w_char, w_start, w_stop): - char = w_char.intval - start, stop, length = _convert_idx_params(space, w_bytearray, w_start, w_stop) count = 0 for i in range(start, min(stop, length)): c = w_bytearray.data[i] diff --git a/pypy/objspace/std/test/test_bytes.py b/pypy/objspace/std/test/test_bytearrayobject.py rename from pypy/objspace/std/test/test_bytes.py rename to pypy/objspace/std/test/test_bytearrayobject.py _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit