Fwd: Could use help wrapping opencv function?
D Herring
dherring at tentpost.com
Mon Oct 7 00:23:10 UTC 2013
Attila Lendvai <attila.lendvai at gmail.com> wrote:
>[this time to the list also]
>
>
>> CV_INLINE CvPoint cvPoint( int x, int y )
>> {
>> CvPoint p;
>>
>> p.x = x;
>> p.y = y;
>>
>> return p;
>> }
>
>
>it's been a while since i was fooling around with C... but 'p' is a
>local variable on the stack, and if you return its address, then it
>will point into nowhere when the C function's stack frame is unwound.
This is return by value, not address...
-- Daniel
More information about the cffi-devel
mailing list