[Numpy-discussion] Cython question
Thu Feb 9 09:35:03 CST 2012
On 9 February 2012 15:29, Charles R Harris <email@example.com> wrote:
> Hi All,
> Does anyone know how to make Cython emit a C macro? I would like to be able
> #define NO_DEPRECATED_API
> and can do so by including a header file or futzing with the generator
> script, but I was wondering if there was an easy way to do it in Cython.
> NumPy-Discussion mailing list
Best way is probably to include a C header file (cdef extern from
"myheader.h": pass), or define the macro with the 'define_macros'
argument to distutils' Extension. There are other tricks but they are
more hacks than anything else.
More information about the NumPy-Discussion