This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, gholling, theller
Date 2009-04-07.21:53:51
SpamBayes Score 5.7784764e-05
Marked as misclassified No
Message-id <1239141234.25.0.54630372992.issue5710@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-04-07 21:53:54amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, theller, gholling
2009-04-07 21:53:54amaury.forgeotdarcsetmessageid: <1239141234.25.0.54630372992.issue5710@psf.upfronthosting.co.za>
2009-04-07 21:53:53amaury.forgeotdarclinkissue5710 messages
2009-04-07 21:53:52amaury.forgeotdarccreate