From e816f827c8a3219681d4b1bcd718939bba4d4db7 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 8 Apr 2008 01:25:09 -0700 Subject: [PATCH] Fix cdef extern classes --- Cython/Compiler/ModuleNode.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 542cf083..16f223c5 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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 -- 2.26.2