[pypy-svn] r26587 - pypy/dist/pypy/translator/c

cfbolz at codespeak.net cfbolz at codespeak.net
Sun Apr 30 00:41:56 CEST 2006


Author: cfbolz
Date: Sun Apr 30 00:41:54 2006
New Revision: 26587

Modified:
   pypy/dist/pypy/translator/c/gc.py
Log:
don't provide type information for types that are anyway atomic


Modified: pypy/dist/pypy/translator/c/gc.py
==============================================================================
--- pypy/dist/pypy/translator/c/gc.py	(original)
+++ pypy/dist/pypy/translator/c/gc.py	Sun Apr 30 00:41:54 2006
@@ -277,10 +277,13 @@
     def struct_setup(self, structdefnode, rtti):
         self.setup_gcinfo(structdefnode)
         T = structdefnode.STRUCT
-        if T._is_varsize():
-            malloc_exact = T._flds[T._arrayfld]._is_atomic()
+        if T._is_atomic():
+            malloc_exact = False
         else:
-            malloc_exact = True
+            if T._is_varsize():
+                malloc_exact = T._flds[T._arrayfld]._is_atomic()
+            else:
+                malloc_exact = True
         if malloc_exact:
             if structdefnode.gcinfo is None:
                 structdefnode.gcinfo = BoehmInfo()



More information about the Pypy-commit mailing list