[Cython] IFDEF in cython ?
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Sat Dec 6 20:46:22 CET 2008
David Cournapeau wrote:
> Hi,
>
> I would like to know whether adding an IFDEF-like feature in cython
> would be feasible ? I would like to define some cython code depending
> on some defines in the header of the library I am wrapping.
Could you tell us what your exact usecase is? Some things are possible
to do in other ways. For instance, if there's a type that's sometimes
"long" and sometimes "short", then Cython doesn't really care about
that, you can always use "int" in Cython anyway. There might be similar
workarounds for whatever your case is.
(That doesn't really improve matters of course, I'll agree to this being
a weakness in Cython.)
--
Dag Sverre
More information about the Cython-dev
mailing list