[pypy-svn] r13130 - pypy/dist/pypy/rpython

pedronis at codespeak.net pedronis at codespeak.net
Tue Jun 7 01:30:47 CEST 2005


Author: pedronis
Date: Tue Jun  7 01:30:46 2005
New Revision: 13130

Modified:
   pypy/dist/pypy/rpython/lltype.py
Log:
don'r access _wrparent from outsider _ptr, _struct and _array



Modified: pypy/dist/pypy/rpython/lltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltype.py	(original)
+++ pypy/dist/pypy/rpython/lltype.py	Tue Jun  7 01:30:46 2005
@@ -334,8 +334,8 @@
         len(PTRTYPE.TO._names) == 0 or
         PTRTYPE.TO._flds[PTRTYPE.TO._names[0]] != CURTYPE.TO):
         raise InvalidCast(CURTYPE, PTRTYPE)
-    ptr._check()
-    parent = ptr._obj._wrparent()
+    parent = ptr._obj._parentstructure()
+    parent._check()
     PARENTTYPE = ptr._obj._wrparent_type
     if getattr(parent, PARENTTYPE._names[0]) is not ptr._obj:
         raise InvalidCast(CURTYPE, PTRTYPE)



More information about the Pypy-commit mailing list