Author: Maciej Fijalkowski <fij...@gmail.com> Branch: inline-dict-ops Changeset: r45329:607f00164b89 Date: 2011-07-03 21:13 +0200 http://bitbucket.org/pypy/pypy/changeset/607f00164b89/
Log: an obscure untested change about keeping alive ctypes structures by subarrays diff --git a/pypy/rpython/lltypesystem/lltype.py b/pypy/rpython/lltypesystem/lltype.py --- a/pypy/rpython/lltypesystem/lltype.py +++ b/pypy/rpython/lltypesystem/lltype.py @@ -1710,7 +1710,8 @@ # Keep the parent array alive, we share the same allocation. # Don't do it if we are inside a GC object, though -- it's someone # else's job to keep the GC object alive - if typeOf(top_container(parent))._gckind == 'raw': + if (typeOf(top_container(parent))._gckind == 'raw' or + hasattr(top_container(parent)._storage, 'contents')): self._keepparent = parent def __str__(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit