[pypy-svn] pypy default: Add a case where the list of bases is empty (hence "object").

arigo commits-noreply at bitbucket.org
Wed Feb 16 15:52:32 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42043:d484be65901c
Date: 2011-02-16 15:50 +0100
http://bitbucket.org/pypy/pypy/changeset/d484be65901c/

Log:	Add a case where the list of bases is empty (hence "object").

diff --git a/lib_pypy/_ctypes/structure.py b/lib_pypy/_ctypes/structure.py
--- a/lib_pypy/_ctypes/structure.py
+++ b/lib_pypy/_ctypes/structure.py
@@ -105,6 +105,7 @@
         res = type.__new__(self, name, cls, typedict)
         if "_abstract_" in typedict:
             return res
+        cls = cls or (object,)
         if isinstance(cls[0], StructOrUnionMeta):
             cls[0]._make_final()
         if '_fields_' in typedict:


More information about the Pypy-commit mailing list