[pypy-commit] pypy faster-rstruct-2: rpython fix, else the types returned by _get_gc_data conflict
antocuni
pypy.commits at gmail.com
Tue May 16 05:40:29 EDT 2017
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91304:3e7adaec029c
Date: 2017-05-15 17:21 +0200
http://bitbucket.org/pypy/pypy/changeset/3e7adaec029c/
Log: rpython fix, else the types returned by _get_gc_data conflict
diff --git a/rpython/rlib/buffer.py b/rpython/rlib/buffer.py
--- a/rpython/rlib/buffer.py
+++ b/rpython/rlib/buffer.py
@@ -172,6 +172,7 @@
ll_items = ll_data.items
LIST = lltype.typeOf(ll_data).TO # rlist.LIST_OF(lltype.Char)
base_ofs = llmemory.itemoffsetof(LIST.items.TO, 0)
+ ll_items = lltype.cast_opaque_ptr(llmemory.GCREF, ll_items)
return ll_items, base_ofs
@@ -233,6 +234,7 @@
def _get_gc_data(self):
lls = llstr(self.value)
+ lls = lltype.cast_opaque_ptr(llmemory.GCREF, lls)
base_ofs = (llmemory.offsetof(STR, 'chars') +
llmemory.itemoffsetof(STR.chars, 0))
return lls, base_ofs
More information about the pypy-commit
mailing list