[pypy-commit] pypy faster-rstruct-2: rpython fix
antocuni
pypy.commits at gmail.com
Tue May 9 13:13:48 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91211:402336bdaae0
Date: 2017-05-09 19:13 +0200
http://bitbucket.org/pypy/pypy/changeset/402336bdaae0/
Log: rpython fix
diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -840,7 +840,7 @@
return rffi.charpsize2str(rffi.ptradd(data, start), size)
finally:
self.array._charbuf_stop()
- return Buffer.getslice(self, start, stop, step, size)
+ return RawBuffer.getslice(self, start, stop, step, size)
def get_raw_address(self):
return self.array._charbuf_start()
diff --git a/rpython/rlib/buffer.py b/rpython/rlib/buffer.py
--- a/rpython/rlib/buffer.py
+++ b/rpython/rlib/buffer.py
@@ -101,6 +101,7 @@
base class if get_raw_address() is potentially costly, like for example if
you call rgc.nonmoving_raw_ptr_for_resizable_list
"""
+ _immutable_ = True
@specialize.ll_and_arg(1)
def typed_read(self, TP, byte_offset):
More information about the pypy-commit
mailing list