minor fixes
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Apr 2008 07:47:04 +0000 (00:47 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 3 Apr 2008 07:47:04 +0000 (00:47 -0700)
Cython/Compiler/ExprNodes.py
Cython/Compiler/ModuleNode.py
Cython/Compiler/Nodes.py

index 9ebb2815b17fc7209ce5aeb5fe129f796e428862..57c8a30016fefc800e1c7a8f2629a696012dc686 100644 (file)
@@ -870,8 +870,6 @@ class NameNode(AtomicExprNode):
     def check_identifier_kind(self):
         #print "NameNode.check_identifier_kind:", self.entry.name ###
         #print self.entry.__dict__ ###
-        print self
-        print self.pos, self.name
         entry = self.entry
         #entry.used = 1
         if not (entry.is_const or entry.is_variable 
index fa35df5d276e09786d9e6e127fffd9aed144c1db..48740706483b2797a2f0515b0abfd6bc75ce93c7 100644 (file)
@@ -255,7 +255,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         self.generate_filename_table(code)
         self.generate_utility_functions(env, code)
 
-        self.generate_declarations_for_module(env, modules, code.h)
+        self.generate_declarations_for_modules(env, modules, code.h)
 
         f = open_new_file(result.c_file)
         f.write(code.h.f.getvalue())
@@ -440,7 +440,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
             self.generate_exttype_vtable_struct(entry, code)
             self.generate_exttype_vtabptr_declaration(entry, code)
     
-    def generate_declarations_for_module(self, env, modules, code):
+    def generate_declarations_for_modules(self, env, modules, code):
         code.putln("")
         code.putln("/* Declarations */")
         vtab_dict = self.generate_vtab_dict(modules)
index 557a75fe1e49424881e56593971bdd50cf5ca996..eaf74f5e29093bdcf5dfc1b9a5552438d1284a20 100644 (file)
@@ -3043,6 +3043,12 @@ class ForFromStatNode(LoopNode, StatNode):
     #  py_loopvar_node    PyTempNode or None
     child_attrs = ["target", "bound1", "bound2", "step", "body", "else_clause", "py_loopvar_node"]
     
+    def analyse_declarations(self, env):
+        self.target.analyse_target_declaration(env)
+        self.body.analyse_declarations(env)
+        if self.else_clause:
+            self.else_clause.analyse_declarations(env)
+    
     def analyse_expressions(self, env):
         import ExprNodes
         self.target.analyse_target_types(env)