Message85749
But isn't this purely a user-side concern?
For example, if I want to use a function such as QBuffer::setBuffer in
the Qt library:
http://doc.trolltech.com/4.4/qbuffer.html#setBuffer
I must keep a reference to the buffer as long as the QBuffer is alive,
or expect a crash.
Returning a pointer from a function is always tough, even in C:
everybody has already tried to return the address of a local variable...
the pointer must belong to some container that outlives the function
call.
ctypes is not different in this aspect. The same precautions as in C
apply. And with a warning note in the documentation, there seems to be
no reason to limit the return type of a callback. |
|
Date |
User |
Action |
Args |
2009-04-07 21:53:54 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, theller, gholling |
2009-04-07 21:53:54 | amaury.forgeotdarc | set | messageid: <1239141234.25.0.54630372992.issue5710@psf.upfronthosting.co.za> |
2009-04-07 21:53:53 | amaury.forgeotdarc | link | issue5710 messages |
2009-04-07 21:53:52 | amaury.forgeotdarc | create | |
|