[Pyrex] A simple question
Lenard Lindstrom
len-l at telus.net
Tue Apr 17 16:10:57 UTC 2007
Alain Pointdexter wrote:
> Hi,
>
> I am confronted to a seemingly simple problem but i cannot find a straightforward solution to it.
>
> 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
> ....
>
I would assume you put an anonymous enum in a cdef extern:
cdef extern from "someheader.h":
enum:
const1
const2
....
Leave out the assignments as the C compiler use the declaration in the C
header file.
--
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list