[Cython] Entry.utility_code_definitions vs. Entry.utility_code

Stefan Behnel stefan_ml at behnel.de
Sun Aug 21 12:31:53 CEST 2011


is there a reason for having the two?

The "uc_definition" is set to instances of "CythonUtilityCode" in 
UtilityCode.py, whereas the other is used to keep references to 
"UtilityCode" instances, but both inject their code in the same way, it 
appears. The first also has dedicated support in the pipeline, whereas 
support for the latter is spread across the syntax tree nodes.

It seems cleaner to me to use the first approach, i.e. to simply walk all 
used entries at some late point in the pipeline and to inject their utility 
code, rather than to leave that responsibility to each node that uses them.

Anything I misunderstood here? If not, any objections to merging the latter 
into the first?


More information about the cython-devel mailing list