[C++-sig] Getting address of wrapped instance?

Hans Meine meine at informatik.uni-hamburg.de
Mon Dec 8 17:33:11 CET 2008


On Monday 08 December 2008 16:23:49 Paul Melis wrote:
> On Mon, December 8, 2008 4:12 pm, Stefan Seefeld wrote:
> > You may try using
> >
> > type const &ref = extract<type const &>(object);
>
> Hmmm, reading my own post I now see I wasn't completely clear.
>
> I need this *in Python*. So for a given Python instance that wraps a C++
> instance I need the address of the wrapped C++ instance.

How about adding an id() method (returning this) to the C++ class and 
exporting that?

HTH,
  Hans


More information about the Cplusplus-sig mailing list