[pypy-svn] r31567 - pypy/branch/no-zeroing-assumption/pypy/rpython/lltypesystem

mwh at codespeak.net mwh at codespeak.net
Wed Aug 23 18:40:53 CEST 2006


Author: mwh
Date: Wed Aug 23 18:40:52 2006
New Revision: 31567

Modified:
   pypy/branch/no-zeroing-assumption/pypy/rpython/lltypesystem/rclass.py
Log:
when a prebuilt instance doesn't have a value for an attribute, don't default
to Uninitialized (which will explode later).  bit nasty really, but this is
easiest for now.


Modified: pypy/branch/no-zeroing-assumption/pypy/rpython/lltypesystem/rclass.py
==============================================================================
--- pypy/branch/no-zeroing-assumption/pypy/rpython/lltypesystem/rclass.py	(original)
+++ pypy/branch/no-zeroing-assumption/pypy/rpython/lltypesystem/rclass.py	Wed Aug 23 18:40:52 2006
@@ -440,8 +440,9 @@
                         if attrvalue is None:
                             warning("prebuilt instance %r has no attribute %r" % (
                                     value, name))
-                            continue
-                        llattrvalue = r.convert_desc_or_const(attrvalue)
+                            llattrvalue = r.lowleveltype._defl(example=True)
+                        else:
+                            llattrvalue = r.convert_desc_or_const(attrvalue)
                     else:
                         llattrvalue = r.convert_const(attrvalue)
                 setattr(result, mangled_name, llattrvalue)



More information about the Pypy-commit mailing list