[Pyrex] A simple question

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 18 22:13:33 UTC 2007


Alain Pointdexter wrote:

> How do you access the constants defined in a .h header file, for example as defined in an anonynous enum.
> cdef enum:
>     const1=1
>     const2=3
>     ....

   cdef extern from "somefile.h":

     cdef enum:
       const1
       const2

and then just use those names. The C compiler will get their
definitions from the .h file.

--
Greg



More information about the Pyrex mailing list