[pypy-svn] r51729 - pypy/branch/unified-rtti/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Thu Feb 21 16:35:02 CET 2008


Author: arigo
Date: Thu Feb 21 16:35:02 2008
New Revision: 51729

Modified:
   pypy/branch/unified-rtti/pypy/rpython/lltypesystem/rvirtualizable.py
Log:
Fix.


Modified: pypy/branch/unified-rtti/pypy/rpython/lltypesystem/rvirtualizable.py
==============================================================================
--- pypy/branch/unified-rtti/pypy/rpython/lltypesystem/rvirtualizable.py	(original)
+++ pypy/branch/unified-rtti/pypy/rpython/lltypesystem/rvirtualizable.py	Thu Feb 21 16:35:02 2008
@@ -34,7 +34,7 @@
         rbase = self.rbase
         accessors = []
         if self.top_of_virtualizable_hierarchy:
-            if len(rbase.allinstancefields) != 1:
+            if len(rbase.allinstancefields) != 0:
                 raise TyperError("virtulizable class cannot have"
                                  " non-virtualizable base class with instance"
                                  " fields: %r" % self.classdef)
@@ -140,7 +140,7 @@
 
     def setfield(self, vinst, attr, vvalue, llops, force_cast=False,
                  flags={}):
-        """Write the given attribute (or __class__ for the type) of 'vinst'."""
+        """Write the given attribute of 'vinst'."""
         if (attr in self.my_redirected_fields
             and not flags.get('access_directly')):
             mangled_name, r = self.fields[attr]



More information about the Pypy-commit mailing list