[pypy-svn] r67469 - pypy/branch/weakdict/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Fri Sep 4 12:26:30 CEST 2009


Author: arigo
Date: Fri Sep  4 12:26:27 2009
New Revision: 67469

Modified:
   pypy/branch/weakdict/pypy/rpython/lltypesystem/llarena.py
Log:
llarena does not support GcStructs with no field or empty arrays.  Crash
explicitly instead of very obscurely.


Modified: pypy/branch/weakdict/pypy/rpython/lltypesystem/llarena.py
==============================================================================
--- pypy/branch/weakdict/pypy/rpython/lltypesystem/llarena.py	(original)
+++ pypy/branch/weakdict/pypy/rpython/lltypesystem/llarena.py	Fri Sep  4 12:26:27 2009
@@ -94,6 +94,8 @@
         return addr2
 
     def setobject(self, objaddr, offset, bytes):
+        assert bytes > 0, ("llarena does not support GcStructs with no field"
+                           " or empty arrays")
         assert offset not in self.objectptrs
         self.objectptrs[offset] = objaddr.ptr
         self.objectsizes[offset] = bytes



More information about the Pypy-commit mailing list