2012/7/8 Stefan Behnel <stefan...@behnel.de>:
> Any reason why the env.add_include_file() calls would be better than the
> header inclusion that I implemented right before the function? It's inside
> of the #ifndef block now. After all, they are only needed by that function,
> and when users override it by redefining the name from the outside, they do
> not need to get included. If users include them themselves, they'll be
> included twice - so what.

I'm not really familiar with Cython internals; I just extended
Compiler/Nodes.py that previously added only <stdexcept>. I observed
that this leads to the headers being included once, at the top of the
file, which seemed like the clean solution.

Multiple inclusion of C++ standard headers should be completely safe,
but I don't know whether the C++ standard says anything about
including standard headers in the middle of a module.

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to