Propagate directives in analysis phase.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 02:58:16 +0000 (19:58 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 02:58:16 +0000 (19:58 -0700)
Cython/Compiler/Nodes.py

index 1757a7d7cf07cf4b7b560212207f21d2180a39e3..51601ca09f9fa08826bfeae7bf7d78683578c64a 100644 (file)
@@ -1398,6 +1398,7 @@ class CFuncDefNode(FuncDefNode):
         return with_gil
 
     def analyse_expressions(self, env):
+        self.local_scope.directives = env.directives
         self.analyse_default_values(env)
         if self.py_func is not None:
             self.py_func.analyse_expressions(env)
@@ -1824,6 +1825,7 @@ class DefNode(FuncDefNode):
             env.control_flow.set_state((), (arg.name, 'initalized'), True)
             
     def analyse_expressions(self, env):
+        self.local_scope.directives = env.directives
         self.analyse_default_values(env)
         if env.is_py_class_scope:
             self.synthesize_assignment_node(env)