On Mar 27, 2009, at 6:58 AM, Lisandro Dalcin wrote:

> On Fri, Mar 27, 2009 at 5:14 AM, Stefan Behnel  
> <[email protected]> wrote:
>> Hoyt Koepke wrote:
>>
>>> BTW, this solution:
>>>
>>>> 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.
>> Could you file a bug report with a test case that shows how to  
>> reproduce
>> this?
>>
>
> But in any case, please DO NOT let code being able to do & 
> (<PyObject*>a).

Actually, this is a non-lvalue, so we do need a temp here.

> I'm almost sure this will completely confuse the refnanny machinery.

Anytime you mess with PyObject* you're able to completely confuse the  
refnanny machinery.

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

Reply via email to