[Cython] A small change in compiler directive implementation
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Mon Sep 22 22:39:02 CEST 2008
Just a note that I've changed some internals with compiler directives.
Before each node would get an "options" attribute in a transform that
ran pretty early. This was getting increasingly cumbersome to deal with
(as transforms needed to make sure options was copied over to new nodes
etc.). So now I've created a CompilerDirectivesNode that sit in the tree
instead. Each recursive process then stores the directives these sets
in different places:
- env.directives
- code.globalstate.directives
- For CythonTransform descendants, self.current_directives is
automatically updated as long as you leave the default
CompilerDirectivesNode visit alone.
If anyone protests I'll take it upon me to back it out.
--
Dag Sverre
More information about the Cython-dev
mailing list