Author: Alex Gaynor <[email protected]>
Branch: struct-double
Changeset: r53153:058cb3a9294f
Date: 2012-03-03 13:55 -0500
http://bitbucket.org/pypy/pypy/changeset/058cb3a9294f/
Log: missing keepaliva
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
@@ -1,5 +1,5 @@
from pypy.rlib import rgc, jit
-from pypy.rlib.objectmodel import enforceargs
+from pypy.rlib.objectmodel import enforceargs, keepalive_until_here
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rpython.annlowlevel import llstr
from pypy.rpython.rptr import PtrRepr
@@ -128,6 +128,7 @@
chars_offset = llmemory.offsetof(BUF_T, 'chars') +
llmemory.itemoffsetof(BUF_T.chars, 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]
+ keepalive_until_here(ll_builder.buf)
ll_builder.used += size
@staticmethod
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit