[C++-sig] When You Create an Python Object Using Boost.Python, How Do You Find Out Its Name?

Nat Goodspeed ngoodspeed at solidworks.com
Tue Jul 10 02:42:15 CEST 2007


> -----Original Message-----
> From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org]
On
> Behalf Of Lawrence Spector
> Sent: Monday, July 09, 2007 5:35 PM
> To: Development of Python/C++ integration
> Subject: Re: [C++-sig] When You Create an Python Object Using
> Boost.Python, How Do You Find Out Its Name?
> 
> Putting a breakpoint in my class, I get the 'this' inside of the
instance
> when it's created is 0x0012ff20, but when the callMethod() is called,
the
> 'this' is 0x00987fc8, so it appears to be a different instance.
> 
> Any idea why?  Does the constructor of boost::python::object make a
copy?

[Nat] Can you reproduce this with a tiny C++ program and a tiny Python
script?



More information about the Cplusplus-sig mailing list