[pypy-commit] pypy struct-double: progress?
alex_gaynor
noreply at buildbot.pypy.org
Sat Mar 3 19:44:34 CET 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: struct-double
Changeset: r53152:52ca642c459a
Date: 2012-03-03 13:44 -0500
http://bitbucket.org/pypy/pypy/changeset/52ca642c459a/
Log: progress?
diff --git a/pypy/rpython/lltypesystem/rbuilder.py b/pypy/rpython/lltypesystem/rbuilder.py
--- a/pypy/rpython/lltypesystem/rbuilder.py
+++ b/pypy/rpython/lltypesystem/rbuilder.py
@@ -126,9 +126,8 @@
ll_builder.grow(ll_builder, size)
chars_offset = llmemory.offsetof(BUF_T, 'chars') + llmemory.itemoffsetof(BUF_T.chars, 0)
- array = llmemory.cast_ptr_to_adr(ll_builder.buf) + chars_offset
- ptr = llmemory.cast_adr_to_int(array) + used
- rffi.cast(rffi.CArrayPtr(T), ptr)[0]
+ array = llmemory.cast_ptr_to_adr(ll_builder.buf) + chars_offset + llmemory.sizeof(BUF_T.chars.OF) * used
+ rffi.cast(rffi.CArrayPtr(T), array)[0]
ll_builder.used += size
@staticmethod
More information about the pypy-commit
mailing list