On Jan 24, 2010, at 11:20 PM, Stefan Behnel wrote:

> [bump]
>
> Stefan Behnel, 10.01.2010 18:23:
>> [...] why not just represent a borrowed reference as a pointer?
>> So you could write
>>
>>     cdef list some_list = []
>>     cdef list* borrowed_ref = some_list
>>
>> and borrowed_ref would be a non-refcounted pointer to a Python list.
>> Assignments back to a normal reference would be allowed:
>>
>>     cdef list my_list = borrowed_ref   # increfs the pointer
>>
>> After all, a non-refcounted reference to a Python object is not  
>> more than a
>> bare pointer to a well-defined Python builtin/extension type  
>> (including
>> "object*").
>
> What do the others think about this?

I think the idea is good, but I'm not a fan of the syntax.

- Robert

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

Reply via email to