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

pyplusplus at assumetheposition.nl pyplusplus at assumetheposition.nl
Mon Dec 8 15:23:50 CET 2008


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.

The use case is to deduce interrelations between C++ objects (think a DAG)
from Python. As different Python wrapper objects might reference the same
C++ instance I can't use id() or repr() of the Python object.

Thanks,
Paul



More information about the Cplusplus-sig mailing list