On Mon, May 11, 2009 at 11:52 AM, Dag Sverre Seljebotn
<[email protected]> wrote:
> Dag wrote:
>>
>> Yes, as I proposed, some kind of syntax to declare your own calling
>> convention; e.g.
>>
>> cdef callspec __mycall "__mycall"
>>
>> cdef __mycall int foo(): return 3
>
I really like this, but I also understand that it is going to be a
burden to implement.
> Alternatively:
>
> from cython import callconvention
>
> @callconvention("__mycall")
> cdef int foo(): ...
>
> though it might be too long? (Shorter name possible on decorator too.)
@callspec("__mycall") seems short and explicit enough for me.
> Similarily one could have
>
> @gccattribute("...")
>
> which I'd prefer to hacking this into a callconvention mechanism.
>
> Dag Sverre
OK, even better, though I would call it "@attribute(...)" or something
like that, as the "gcc" bit seems not appropriate (because the the
syntax could target special features of other compilers, not just GCC)
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev