Re: [C++-sig] Boost.Python: How to fill a passed in buffer in Python

2012-05-01 Thread Roman Yakovenko
On Tue, May 1, 2012 at 10:53 PM, Ehsan Pi wrote: > In Python, the output of the GetAddress is a void * to the memory address: > >     >>> import MyWrapper >     >>> foo = MyWrapper.Foo(100) >     >>> address = foo.GetAddress() >     >>> print address >     >     >>> > > My question is can I fill

[C++-sig] Boost.Python: How to fill a passed in buffer in Python

2012-05-01 Thread Ehsan Pi
Hello forum, I have a buffer in C++ that I need to fill in Python. The Address of the buffer is obtained through the GetAddress method which returns a void pointer to the buffer address. #include class Foo { public: Foo(const unsigned int length) { m_b