Robert Bradshaw wrote:
>> On Fri, Mar 27, 2009 at 5:14 AM, Stefan Behnel wrote:
>>> Hoyt Koepke wrote:
>>>>> You can do <PyObject*>a, so do &(<PyObject*>a) to get a PyObject**
>>>> gives me the error message
>>>>
>>>> /home/hoytak/workspace/paramtree/paramtree/paramtree.pyx:648:31:
>>>> Taking address of non-lvalue
>>>>
>>>> Is that a bug?
>>> Hmm, I don't see an obvious problem with this, so it looks like a  
>>> bug.
> 
> Actually, this is a non-lvalue, so we do need a temp here.

Ah, right, I got confused.

Actually, it's not even that bad that this uses a temp variable - although
it wouldn't be strictly necessary for Python objects. This actually makes
it clear to users that they are doing dangerous stuff that needs special
consideration.

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

Reply via email to