Commit e82a3a33 authored by Vitja Makarov's avatar Vitja Makarov

FusedCFuncDefNode: don't call AnalyseDeclarations directly

parent 2bb2f5e5
...@@ -2557,7 +2557,9 @@ def __pyx_fused_cpdef(signatures, args, kwargs): ...@@ -2557,7 +2557,9 @@ def __pyx_fused_cpdef(signatures, args, kwargs):
py_func.analyse_declarations(env) py_func.analyse_declarations(env)
# ... and its body # ... and its body
py_func.scope = env py_func.scope = env
ParseTreeTransforms.AnalyseDeclarationsTransform(None)(py_func)
# Will be analysed later by underlying AnalyseDeclarationsTransform
#ParseTreeTransforms.AnalyseDeclarationsTransform(None)(py_func)
e, orig_e = py_func.entry, orig_py_func.entry e, orig_e = py_func.entry, orig_py_func.entry
......
...@@ -1493,9 +1493,9 @@ if VALUE is not None: ...@@ -1493,9 +1493,9 @@ if VALUE is not None:
if node.py_func: if node.py_func:
node.stats.insert(0, node.py_func) node.stats.insert(0, node.py_func)
self.visit(node.py_func)
if node.py_func and node.py_func.needs_assignment_synthesis(env): if node.py_func.needs_assignment_synthesis(env):
node = [node, self._synthesize_assignment(node.py_func, env)] node = [node, self._synthesize_assignment(node.py_func, env)]
else: else:
node.body.analyse_declarations(lenv) node.body.analyse_declarations(lenv)
......
...@@ -273,8 +273,6 @@ class CythonTransform(VisitorTransform): ...@@ -273,8 +273,6 @@ class CythonTransform(VisitorTransform):
import ModuleNode import ModuleNode
if isinstance(node, ModuleNode.ModuleNode): if isinstance(node, ModuleNode.ModuleNode):
self.current_directives = node.directives self.current_directives = node.directives
else: # XXX: is default directives better?
self.current_directives = {}
return super(CythonTransform, self).__call__(node) return super(CythonTransform, self).__call__(node)
def visit_CompilerDirectivesNode(self, node): def visit_CompilerDirectivesNode(self, node):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment