[C++-sig] Exposing a C-style array data member to Python via Boost.Python

2013-07-26 Thread Ashish Sadanandan
I have a struct that contains a C-style array data member. I'd like to have this struct exposed to Python, and this data member be accessible as a tuple in Python. struct S { char arr[10]; }; void foo( S const * ) {} BOOST_PYTHON_MODULE( test ) { using namespace boost::python; class_( "S"

Re: [C++-sig] Exposing a C-style array data member to Python via Boost.Python

2013-07-26 Thread Ashish Sadanandan
Ashish Sadanandan gmail.com> writes: > > I have a struct that contains a C-style array data member. I'd like to have > this struct exposed to Python, and this data member be accessible as a tuple > in Python. > > struct S > { > char arr[10]; > }; > > > So the question is, how can I expose t