[pypy-svn] r51442 - pypy/dist/pypy/rpython/memory
arigo at codespeak.net
arigo at codespeak.net
Wed Feb 13 17:06:30 CET 2008
Author: arigo
Date: Wed Feb 13 17:06:29 2008
New Revision: 51442
Modified:
pypy/dist/pypy/rpython/memory/gcwrapper.py
Log:
Fix for gcwrapper support for dictionaries (we see _interior_ptr objects
here).
Modified: pypy/dist/pypy/rpython/memory/gcwrapper.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gcwrapper.py (original)
+++ pypy/dist/pypy/rpython/memory/gcwrapper.py Wed Feb 13 17:06:29 2008
@@ -177,10 +177,10 @@
return constants
def reccollect(constants, llvalue):
- T = lltype.typeOf(llvalue)
- if isinstance(T, lltype.Ptr) and llvalue and llvalue._obj not in constants:
+ if (isinstance(llvalue, lltype._abstract_ptr)
+ and llvalue._obj is not None and llvalue._obj not in constants):
+ TYPE = llvalue._T
constants[llvalue._obj] = True
- TYPE = T.TO
if isinstance(TYPE, lltype.Struct):
for name in TYPE._names:
reccollect(constants, getattr(llvalue, name))
More information about the Pypy-commit
mailing list