In wrapping a C library, I come across many #define statements that I
need to use elsewhere. When they simply define a constant, I use an
anonymous enum and all is well.

But how would I wrap something like this that shown up in a header
file that i'm cdef extern'ing from:

#define CV_TREE_NODE_FIELDS(node_type)                               \

    int       flags;                \

    int       header_size;          \

    struct    node_type* h_prev;      \

    struct    node_type* h_next;     \

    struct    node_type* v_prev;       \

    struct    node_type* v_next ;


or something like this:

#define CV_IS_STORAGE(storage)  \

    ((storage) != NULL &&       \

    (((CvMemStorage*)(storage))->signature & CV_MAGIC_MASK) ==
CV_STORAGE_MAGIC_VAL)




Thanks and Cheers!

Chris
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to