[C++-sig] Re: PyTypeObject of an exported C++ class

David Abrahams dave at boost-consulting.com
Wed May 26 20:47:43 CEST 2004


Pierre Barbier de Reuille <pierre.barbier at cirad.fr> writes:

> Is there a way to get the PyTypeObject of a C++ class exported with
> Boost.Python ?

object c = class_<SomeClass...>("SomeClass") ... ;

PyTypeObject* c2 = (PyTypeObject*)c.ptr();

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list