Pyrex merge: removed leaking declarations
authorStefan Behnel <scoder@users.berlios.de>
Fri, 6 Jun 2008 19:38:45 +0000 (21:38 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 6 Jun 2008 19:38:45 +0000 (21:38 +0200)
Cython/Compiler/ModuleNode.py

index b5334c1ae6002994027466131ec1f2fe1b417c3a..587cd2c50294155994536391ca967417f4374fce 100644 (file)
@@ -702,8 +702,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
                     entry.type.typeptr_cname)
         code.put_var_declarations(env.var_entries, static = 1, 
             dll_linkage = "DL_EXPORT", definition = definition)
-        code.put_var_declarations(env.default_entries, static = 1,
-                                  definition = definition)
+        if definition:
+            code.put_var_declarations(env.default_entries, static = 1,
+                                      definition = definition)
     
     def generate_cfunction_predeclarations(self, env, code, definition):
         for entry in env.cfunc_entries: