On Thu, Sep 3, 2009 at 8:51 AM, Dag Sverre
Seljebotn<[email protected]> wrote:
> I'm wondering whether we can change this for 0.11.3:
>
> Currently (if I understand correctly) Cython decides whether you want
> C99 complex or Cython complex structs based on whether complex.h is
> included or not.
>

But how the inclusion of "complex.h" is detected ?

> I think this is a bit too magic. Even if it works, it seems a bit
> confusing, and the thing is it won't work if you're interfacing with
> functions in C libraries taking complex numbers (which, of course, in
> turn include complex.h, but Cython doesn't see that).
>

I agree...

> I'm wondering if we can move to a directive-only approach,

No, please... Use the C preprocessor for "activating" the C99 complex
stuff... This way you have chance that the same generated C source
could be used with compilers missing C99 complex support...

Of course, you can still use a directive, where the options where {
yes | no | C-compile-time}, the last based on a preprocessor
definition...

> and make C99
> complex the default?
>

I bet you use GCC as much as me... However, you always forget that we
have to live with the nightmare of MSVC compilers being used out
there... So I think no, C99 complex cannot be the default



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to