Re: [C++-sig] boost python exposing const*

2015-09-09 Thread Holger Joukl
Hi, > I have a c++ class T that I succesfully expose via: > > class_ ... > > later on, I have > > struct S { >   const T* underlying; > }; > > class_("S"). >     .def_readonly("underlying", &S::underlying) > ; > > From python, when I call: > > s.underlying > > where s is a python instance of S, i

[C++-sig] boost python exposing const*

2015-09-05 Thread MM
I have a c++ class T that I succesfully expose via: class_ ... later on, I have struct S { const T* underlying; }; class_("S"). .def_readonly("underlying", &S::underlying) ; >From python, when I call: s.underlying where s is a python instance of S, i get the following error: TypeErro