On Mar 5, 2010, at 6:09 AM, Lisandro Dalcin wrote: > On 4 March 2010 19:45, Greg Ewing <[email protected]> wrote: >> Gregor Thalhammer wrote: >> >>> cdef extern from "cheesefinder.h": >>> ctypedef void myvoid >>> ctypedef myvoid (__stdcall *cheesefunc)(char *name, void >>> *user_data) #this g >>> ives 'Syntax error in ctypedef statement' >> >> Seems to be a Cython-only problem, as this compiles >> okay with Pyrex 0.9.8.6. >> > > Indeed. IIRC, Robert changed the parser in order to support other > things, and then some function typedefs stop working.
Sorry, I didn't realize I broke anything. (Insufficient regression tests I guess, as I never use __stdcall etc.) > Gregor: I would declare things like things: > > ctypedef myvoid __stdcall cheesefunc(char *name, void *user_data) > > void find_cheeses(cheesefunc* user_func, void *user_data) The above code certainly looks cleaner to me, though that's a matter of preference. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
