Commit fda65d47 authored by Robert Bradshaw's avatar Robert Bradshaw

Disable closures inside cdef functions for now.

parent 0a9993ee
...@@ -7,7 +7,7 @@ debug_coercion = 0 ...@@ -7,7 +7,7 @@ debug_coercion = 0
debug_temp_code_comments = 0 debug_temp_code_comments = 0
# Write a call trace of the code generation phase into the C code # Write a call trace of the code generation phase into the C code
debug_trace_code_generation = 0 debug_trace_code_generation = 1
# Do not replace exceptions with user-friendly error messages # Do not replace exceptions with user-friendly error messages
debug_no_exception_intercept = 0 debug_no_exception_intercept = 0
......
...@@ -1225,6 +1225,12 @@ class MarkClosureVisitor(CythonTransform): ...@@ -1225,6 +1225,12 @@ class MarkClosureVisitor(CythonTransform):
self.needs_closure = True self.needs_closure = True
return node return node
def visit_CFuncDefNode(self, node):
self.visit_FuncDefNode(node)
if node.needs_closure:
error(node.pos, "closures inside cdef functions not yet supported")
return node
def visit_LambdaNode(self, node): def visit_LambdaNode(self, node):
self.needs_closure = False self.needs_closure = False
self.visitchildren(node) self.visitchildren(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