support ext type inheritance from builtin types
[cython.git] / Cython / Compiler / Nodes.py
index 593f9f6ad0dc011064f99316e8d83ae1d4e3a31e..6fc38988dd35f7c7e45a9614c60376fc2bf102dc 100644 (file)
@@ -3192,7 +3192,9 @@ class CClassDefNode(ClassDefNode):
                 if base_class_entry:
                     if not base_class_entry.is_type:
                         error(self.pos, "'%s' is not a type name" % self.base_class_name)
-                    elif not base_class_entry.type.is_extension_type:
+                    elif not base_class_entry.type.is_extension_type and \
+                             not (base_class_entry.type.is_builtin_type and \
+                                  base_class_entry.type.objstruct_cname):
                         error(self.pos, "'%s' is not an extension type" % self.base_class_name)
                     elif not base_class_entry.type.is_complete():
                         error(self.pos, "Base class '%s' of type '%s' is incomplete" % (