[C++-sig] Passing objects between python / c++
roman.yakovenko at gmail.com
Wed Oct 25 08:11:21 CEST 2006
On 10/25/06, Mark Williams <mark at image-engine.com> wrote:
> >I think you are wrong. Remove from example derived class, make base class to
> >be constructable( no pure virtual function ) and replace smart_ptr_t with
> >intrusive_ptr. I think this will work.
> Below is what I've tried, following your suggestion. The original tests pass, but the one I added to test passing an instance of the class through C++ fails :
> File "test.py", line 44, in test_object_passing
> self.assert_( c is d )
> This assert definitely passes if shared_ptr is used in place of intrusive_ptr.
I think this is "an identity problem". Search for it in the mailing
list. Also c and expose
same object they are different Python objects.
Am I right?
C++ Python language binding
More information about the Cplusplus-sig