From 888d2ef322a3e15af6789389fd9d7b48324838c9 Mon Sep 17 00:00:00 2001
From: Robert Bradshaw <robertwb@math.washington.edu>
Date: Wed, 11 Jun 2008 14:47:03 -0700
Subject: [PATCH] Fix e_ctypedefornot

---
 Cython/Compiler/Symtab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
index ffe2ebbc..141c7c83 100644
--- a/Cython/Compiler/Symtab.py
+++ b/Cython/Compiler/Symtab.py
@@ -919,7 +919,7 @@ class ModuleScope(Scope):
                 entry = None # Will cause redeclaration and produce an error
             else:
                 scope = type.scope
-                if typedef_flag and (scope and scope.defined):
+                if typedef_flag and (not scope or scope.defined):
                     self.check_previous_typedef_flag(entry, typedef_flag, pos)
                 if (scope and scope.defined) or (base_type and type.base_type):
                     if base_type and base_type is not type.base_type:
-- 
2.26.2