On Apr 20, 2009, at 8:17 AM, Jean-Francois Moulin wrote: > Hi > > I am struggling with a function pointer problem: > > cdef class LstFileReader_FAST: > cdef tuple (*do_read_ev)(LstFileReader_FAST) > > def __init__(self,fname): > > self.fname = fname > self.goto_start() > self.do_read_ev = self._next_ev > ..... > > results in a compilation error: > > Cannot assign type 'tuple (LstFileReader_FAST, int > __pyx_skip_dispatch)' to 'tuple (*)(LstFileReader_FAST)' > > I found no clear explanation for this __pyx_skip_dispatch...
I bet you've declared self._next_ev to be a cpdef (not cdef) function. cpdef functions have an extra implicit argument "__pyx_skip_dispatch" which lets them know whether or not they should skip a possible lookup in the objects dictionary. This should probably be a clearer error though... - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
