[pypy-svn] r49825 - in pypy/dist/pypy/rpython/memory: . test

arigo at codespeak.net arigo at codespeak.net
Sun Dec 16 11:07:55 CET 2007


Author: arigo
Date: Sun Dec 16 11:07:54 2007
New Revision: 49825

Modified:
   pypy/dist/pypy/rpython/memory/gctypelayout.py
   pypy/dist/pypy/rpython/memory/test/test_gctypelayout.py
Log:
Fix shallow test failure.


Modified: pypy/dist/pypy/rpython/memory/gctypelayout.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctypelayout.py	(original)
+++ pypy/dist/pypy/rpython/memory/gctypelayout.py	Sun Dec 16 11:07:54 2007
@@ -272,7 +272,8 @@
         return fptr
 
     def make_finalizer_funcptr_for_type(self, TYPE):
-        return None   # must be overridden for proper finalizer support
+        # must be overridden for proper finalizer support
+        return lltype.nullptr(GCData.ADDRESS_VOID_FUNC)
 
     def initialize_gc_query_function(self, gc):
         return GCData(self.type_info_list).set_query_functions(gc)

Modified: pypy/dist/pypy/rpython/memory/test/test_gctypelayout.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_gctypelayout.py	(original)
+++ pypy/dist/pypy/rpython/memory/test/test_gctypelayout.py	Sun Dec 16 11:07:54 2007
@@ -1,4 +1,4 @@
-from pypy.rpython.memory.gctypelayout import TypeLayoutBuilder
+from pypy.rpython.memory.gctypelayout import TypeLayoutBuilder, GCData
 from pypy.rpython.memory.gctypelayout import offsets_to_gc_pointers
 from pypy.rpython.lltypesystem import lltype
 
@@ -36,6 +36,7 @@
     for T1, T2 in [(GC_A, GC_S), (GC_A2, GC_S2), (GC_S3, GC_S2)]:
         tid1 = layoutbuilder.get_type_id(T1)
         tid2 = layoutbuilder.get_type_id(T2)
-        lst1 = layoutbuilder.q_varsize_offsets_to_gcpointers_in_var_part(tid1)
-        lst2 = layoutbuilder.q_offsets_to_gc_pointers(tid2)
+        gcdata = GCData(layoutbuilder.type_info_list)
+        lst1 = gcdata.q_varsize_offsets_to_gcpointers_in_var_part(tid1)
+        lst2 = gcdata.q_offsets_to_gc_pointers(tid2)
         assert len(lst1) == len(lst2)



More information about the Pypy-commit mailing list