i just saw this line in the docs: 6. If the header file defines a function using a macro, declare it as though it were an ordinary function, with appropriate argument and result types.
So i'll start there. Sorry for the bogus post. On Wed, Jul 1, 2009 at 1:52 PM, Chris Colbert<[email protected]> wrote: > 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 [email protected] http://codespeak.net/mailman/listinfo/cython-dev
