From: Robert Bradshaw Date: Thu, 3 Apr 2008 07:47:04 +0000 (-0700) Subject: minor fixes X-Git-Tag: 0.9.6.14~29^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=96945dd7fa0fbbeb74f91becc6e65fd5f8b34f7b;p=cython.git minor fixes --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 9ebb2815..57c8a300 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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 diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index fa35df5d..48740706 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 557a75fe..eaf74f5e 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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)