Fix cdef extern classes
authorRobert Bradshaw <robertwb@math.washington.edu>
Tue, 8 Apr 2008 08:25:09 +0000 (01:25 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Tue, 8 Apr 2008 08:25:09 +0000 (01:25 -0700)
Cython/Compiler/ModuleNode.py

index 542cf083b32a87137b87e88fc3ab6d1c189ba831..16f223c53a17091acd160c4349bb8bcb55e0a0f6 100644 (file)
@@ -27,9 +27,10 @@ def recurse_vtab_check_inheritance(entry, b, dict):
             return False
         if base.type.base_type.vtabstruct_cname == b.type.vtabstruct_cname:
             return True
-        if base.type.base_type.typedef_flag:
+        try:
+            base = dict[base.type.base_type.vtabstruct_cname]
+        except KeyError:
             return True
-        base = dict[base.type.base_type.vtabstruct_cname]
     return False
     
 def recurse_vtabslot_check_inheritance(entry, b, dict):
@@ -39,9 +40,10 @@ def recurse_vtabslot_check_inheritance(entry, b, dict):
             return False
         if base.type.base_type.objstruct_cname == b.type.objstruct_cname:
             return True
-        if base.type.base_type.typedef_flag:
+        try:
+            base = dict[base.type.base_type.objstruct_cname]
+        except KeyError:
             return True
-        base = dict[base.type.base_type.objstruct_cname]
     return False