Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r74209:8e7946c8cbe7
Date: 2014-10-25 15:38 +0200
http://bitbucket.org/pypy/pypy/changeset/8e7946c8cbe7/

Log:    This change broke some 32-bit tests in jit/backend/x86. Revert it
        and make the hack more local to pypy/module/bz2.

diff --git a/pypy/module/bz2/test/support.py b/pypy/module/bz2/test/support.py
--- a/pypy/module/bz2/test/support.py
+++ b/pypy/module/bz2/test/support.py
@@ -3,6 +3,11 @@
         from rpython.rtyper.lltypesystem import ll2ctypes
         import gc
         tries = 20
+        # remove the GC strings from ll2ctypes
+        for key, value in ll2ctypes.ALLOCATED.items():
+            if value._TYPE._gckind == 'gc':
+                del ll2ctypes.ALLOCATED[key]
+        #
         while tries and ll2ctypes.ALLOCATED:
             gc.collect() # to make sure we disallocate buffers
             tries -= 1
diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py 
b/rpython/rtyper/lltypesystem/ll2ctypes.py
--- a/rpython/rtyper/lltypesystem/ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/ll2ctypes.py
@@ -565,8 +565,6 @@
         if addr in ALLOCATED:
             raise Exception("internal ll2ctypes error - "
                             "double conversion from lltype to ctypes?")
-        if self._TYPE._gckind == 'gc':
-            return
         # XXX don't store here immortal structures
         ALLOCATED[addr] = self
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to