[C++-sig] Wrappend objects identity problem
Andreas Beyer
mail at a-beyer.de
Thu Mar 30 08:45:24 CEST 2006
This issue keeps coming up again and again:
http://article.gmane.org/gmane.comp.python.c++/9046
http://article.gmane.org/gmane.comp.python.c++/9029
http://article.gmane.org/gmane.comp.python.c++/7977
So, maybe someone would volunteer to write a FAQ for this issue?
Andreas
Victor Nakoryakov wrote:
>Thanks for your reply.
>
>David Abrahams wrote:
>
>
>>It sounds like you want a smart pointer that, when converted to Python
>>the first time, manages a Python object. That would make an
>>interesting addition to Boost.Python.
>>
>>
>>
>
>Yes, I think this is what I want :)
>
>
>So... If I have a function in wrapped class 'A' that returns
>shared_ptr<B> where 'B' is another wrapped class then to get always the
>same py address of 'B' I have to write thin wrapper, that will convert
>shared_ptr<B> to python::object and expose that function instead of
>original. Am I right?
>
>
>
--
Dr. Andreas Beyer
mail at a-beyer.de
www.andreas-beyer.de
More information about the Cplusplus-sig
mailing list