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

Paul Melis pyplusplus at assumetheposition.nl
Mon Dec 8 16:23:49 CET 2008


On Mon, December 8, 2008 4:12 pm, Stefan Seefeld wrote:
> pyplusplus at assumetheposition.nl wrote:
>> Is there are way to get the address of the C++ instance pointed to by a
>> given Boost.Python wrapper object? I don't need a real pointer, the
>> address alone suffices.
>>
>
> 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.

Paul

>
>
> HTH,
>        Stefan
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>




More information about the Cplusplus-sig mailing list