[pypy-svn] r48927 - pypy/branch/remove-extcompiler-rctypes/pypy/rpython/memory/gctransform

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Nov 22 16:34:10 CET 2007


Author: cfbolz
Date: Thu Nov 22 16:34:09 2007
New Revision: 48927

Modified:
   pypy/branch/remove-extcompiler-rctypes/pypy/rpython/memory/gctransform/refcounting.py
Log:
(pedronis, cfbolz): PyObjects don't need an RPython deallocator


Modified: pypy/branch/remove-extcompiler-rctypes/pypy/rpython/memory/gctransform/refcounting.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/rpython/memory/gctransform/refcounting.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/rpython/memory/gctransform/refcounting.py	Thu Nov 22 16:34:09 2007
@@ -189,6 +189,8 @@
             return self.static_deallocator_funcptrs[TYPE]
         #print_call_chain(self)
 
+        if TYPE._gckind == 'cpy':
+            return # you don't really have an RPython deallocator for PyObjects
         rtti = get_rtti(TYPE) 
         if rtti is not None and hasattr(rtti._obj, 'destructor_funcptr'):
             destrptr = rtti._obj.destructor_funcptr
@@ -198,7 +200,6 @@
             DESTR_ARG = None
 
         if destrptr is None and not find_gc_ptrs_in_type(TYPE):
-            assert TYPE._gckind != 'cpy'
             p = self.no_pointer_dealloc_ptr.value
             self.static_deallocator_funcptrs[TYPE] = p
             return p



More information about the Pypy-commit mailing list