fix struct auto-typedef-ing
authorStefan Behnel <scoder@users.berlios.de>
Fri, 20 Mar 2009 14:30:09 +0000 (15:30 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 20 Mar 2009 14:30:09 +0000 (15:30 +0100)
Cython/Compiler/Nodes.py

index a7b8077ffe08e8ea10629645795e48d6b7a0f211..0c4e2258cffac9460dc48e429390ab8776f37093 100644 (file)
@@ -849,7 +849,8 @@ class CStructOrUnionDefNode(StatNode):
                         self.name, struct_entry.type, self.pos,
                         cname = self.cname, visibility='ignore')
                     struct_entry.type.typedef_flag = False
-                    struct_entry.cname = struct_entry.type.cname = env.new_const_cname()
+                    # FIXME: this might be considered a hack ;-)
+                    struct_entry.cname = struct_entry.type.cname = '_' + self.cname
     
     def analyse_expressions(self, env):
         pass