error in usin list with boost

Heiko Wundram modelnine at ceosg.de
Sun Jun 5 13:00:13 CEST 2005


Am Sonntag, 5. Juni 2005 08:13 schrieb GujuBoy:
> static list retrieval_as_list(SplitText &self, int position,
>          int retrieveLength) {
>         list result;

If I'm not completely mistaken: you know that this usage should (at least 
under all sensible terms) allocate a list on the stack and thus local to the 
function and not on the heap, unless boost does some mumbo jumbo that I know 
nothing of like starting the list with refcount=2? I don't think that's what 
you want...

But for your boost usage, I have absolutely no idea! Why not write the Python 
wrapper directly in C? Just as easy, probably. And from what my experience is 
with using SWIG and SIP: much less errorprone...

-- 
--- Heiko.
  see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050605/10307c1b/attachment.sig>


More information about the Python-list mailing list