[pypy-commit] pypy default: remove unused helper function
cfbolz
noreply at buildbot.pypy.org
Thu Nov 10 13:44:40 CET 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch:
Changeset: r49134:af7955a87f1b
Date: 2011-11-10 13:43 +0100
http://bitbucket.org/pypy/pypy/changeset/af7955a87f1b/
Log: remove unused helper function
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]
More information about the pypy-commit
mailing list