Lisandro wrote: > On Wed, May 13, 2009 at 1:06 PM, Dag Sverre Seljebotn > <[email protected]> wrote: >> Lisandro Dalcin wrote: >>> >>> The only possibility I can imagine up to now is something like: >>> >>> cdef void callspec("something") myfunc(): pass >>> >>> cdef void (callspec("something") *p)() >>> >>> p = myfunc >> >> +1 from me (if the decorator is also available). > > Then, what should happen with this code > > @cython.callspec("foo") > cdef void callspec("bar") myfunc(): pass > > It seems it should fail, right ? However, perhaps it should pass if > the callspec's are the same ?
Either is fine with me. > In general, the problem is not to make the Cython parser accept and > and do the right thing with VALID syntax... the hard part is to make > it fail nicely (I mean, inform about the errors and not crashing) for > INVALID syntax... Yes :-) BTW if you refer to the situation above, I believe one should pass on both declarations from the parser and raise an error in PostParse? That way one doesn't need to change the parser at all for the decorator. Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
