Commit 96860564 authored by Stefan Behnel's avatar Stefan Behnel

Revert "Revert "Avoid some unnecessary traversal in "ForwardDeclareTypes".""

This reverts commit f09e61ab.
parent cf5e3fe3
......@@ -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