[Cython] cimport does not respect .H include order
Robert Bradshaw
robertwb at math.washington.edu
Sat Nov 22 01:21:33 CET 2008
On Nov 21, 2008, at 4:19 PM, Greg Ewing wrote:
> Stephane DROUARD wrote:
>> This is because in the latter, Cython generates the #include's in
>> the wrong order:
>> #include "bar.h"
>> #include "foo.h"
>
> Cython/Pyrex has no way of knowing what the internal dependencies
> are between .h files. If one .h file depends on another, it should
> #include it itself (with appropriate protection against multiple
> inclusion).
I actually just ran into this myself in Sage. Though of course all
dependancies can't be resolved, I've made it so cimported includes
always come first:
http://hg.cython.org/cython-devel/rev/8c0c3784245e
- Robert
More information about the Cython-dev
mailing list