Author: Armin Rigo <[email protected]>
Branch: py3.5-bytearray
Changeset: r88848:93e5ab1a4ea7
Date: 2016-12-03 13:27 +0100
http://bitbucket.org/pypy/pypy/changeset/93e5ab1a4ea7/
Log: fix jit.conditional_call
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
@@ -415,10 +415,7 @@
assert n >= 0
self._offset += n
jit.conditional_call(self._offset > len(self._data) / 2,
- self._shrink_after_delete_from_start)
-
- def _shrink_after_delete_from_start(self):
- self.getdata()
+ _shrink_after_delete_from_start, self)
def descr_append(self, space, w_item):
self._data.append(getbytevalue(space, w_item))
@@ -1326,3 +1323,6 @@
def _tweak_for_tests(w_bytearray):
"Patched in test_bytearray.py"
+
+def _shrink_after_delete_from_start(w_bytearray):
+ w_bytearray.getdata()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit