Commit 5204d869 authored by Stefan Behnel's avatar Stefan Behnel

Avoid some unnecessary traversal in "ForwardDeclareTypes".

parent 203ec86c
......@@ -1510,6 +1510,10 @@ class CnameDirectivesTransform(CythonTransform, SkipDeclarations):
class ForwardDeclareTypes(CythonTransform):
"""
Declare all global cdef names that we allow referencing in other places,
before declaring everything (else) in source code order.
"""
def visit_CompilerDirectivesNode(self, node):
env = self.module_scope
......@@ -1553,6 +1557,14 @@ class ForwardDeclareTypes(CythonTransform):
entry.type.get_all_specialized_function_types()
return node
def visit_FuncDefNode(self, node):
# no traversal needed
return node
def visit_PyClassDefNode(self, node):
# no traversal needed
return node
class AnalyseDeclarationsTransform(EnvTransform):
......
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