On Fri, 26 Apr 2013 02:08:06 +0600, Gerald Dalley
<
gerald...@gmail.com> wrote:
> On Thursday, April 25, 2013 3:54:45 PM UTC-4, Czarek Tomczak wrote:
>>
>> I'm depending on a library that uses this style of references, I'm not
>> sure how to go around this, I'm stuck with Cython 0.17.4 it seems.
>> Yes, that was a trimmed-down example.
A simple (and ugly) workaround for reference assignment:
cdef void test(int& out):
(&out)[0] = 123
>> On Thursday, April 25, 2013 9:47:50 PM UTC+2, Robert Bradshaw wrote:
>>> I'm curious how this ever worked. In any case, there's no reason to
>>> pass a bool as a ref, and certainly not if you're going to re-assign
>>> it before even looking at it (which I assume is an artifact of being a
>>> trimmed-down example).
Using references for output parameters is relatively common in C++,
there is nothing unusual in Czarek's example.
Best regards,
Nikita Nemkin