[pypy-svn] r49781 - pypy/branch/lazy-write-barrier/pypy/rpython/memory

fijal at codespeak.net fijal at codespeak.net
Fri Dec 14 14:05:24 CET 2007


Author: fijal
Date: Fri Dec 14 14:05:19 2007
New Revision: 49781

Modified:
   pypy/branch/lazy-write-barrier/pypy/rpython/memory/gctypelayout.py
Log:
Fix calculation


Modified: pypy/branch/lazy-write-barrier/pypy/rpython/memory/gctypelayout.py
==============================================================================
--- pypy/branch/lazy-write-barrier/pypy/rpython/memory/gctypelayout.py	(original)
+++ pypy/branch/lazy-write-barrier/pypy/rpython/memory/gctypelayout.py	Fri Dec 14 14:05:19 2007
@@ -175,13 +175,8 @@
         adr = llmemory.cast_ptr_to_adr(value._as_ptr())
         if TYPE._gckind == "gc":
             if gen_gc:
-                # check if have any
-                gen = mutable_gc_pointers_inside(value, adr)
-                try:
-                    gen.next()
-                except StopIteration:
-                    return
-                self.additional_roots_sources += 1
+                for a in mutable_gc_pointers_inside(value, adr):
+                    self.additional_roots_sources += 1
                 return
             else:
                 appendto = self.addresses_of_static_ptrs



More information about the Pypy-commit mailing list