Lisandro Dalcin wrote:
> I've partially implemented the @cython.callspec("something") stuff. It
> actually solves my particular needs, but it not all the possible
> needs. The problem is that the calling convention spec is part of the
> type of the function, and a general solution should handle the code
> below:
>
> @cython.callspec("something")
> cdef void myfunc(): pass
>
> @cython.callspec("something")
> cdef void (*p)()
>
> p = myfunc
>
> But then the decoration on the function pointer "p" IMHO deviates too
> much for the normal Python meaning of decorators...
>
>
> 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). As long as I'm not the
one who has to make the parser accept it :-)
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev