Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: inline-dict-ops
Changeset: r48279:7e7d1b1bd768
Date: 2011-10-20 20:38 +0200
http://bitbucket.org/pypy/pypy/changeset/7e7d1b1bd768/

Log:    just always keepalive parent. Passes tests and seems that the
        original reason for a convoluted if disappeared (as per skipped
        tests)

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
@@ -1517,12 +1517,7 @@
         self._wrparent = weakref.ref(parent)
         self._parent_type = typeOf(parent)
         self._parent_index = parentindex
-        if (isinstance(self._parent_type, Struct)
-            and self._parent_type._names
-            and parentindex in (self._parent_type._names[0], 0)
-            and self._TYPE._gckind == typeOf(parent)._gckind):
-            # keep strong reference to parent, we share the same allocation
-            self._keepparent = parent 
+        self._keepparent = parent
 
     def _parentstructure(self, check=True):
         if self._wrparent is not None:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to