On May 11, 2009, at 11:18 AM, Dag Sverre Seljebotn wrote:

> Lisandro Dalcin wrote:
>> 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.
>
> +1. Especially since no change in the parser is required :-)

I like @callspec("__mycall"") too, and the preferred way to do things  
(rather than the ones we support so far). An @attribute decorators  
would be useful too, but orthogonal (I'd rather have it just be for  
__attribute__.).

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to