Re: [C++-sig] Boost.Python + OpenGL segmentation faults

2009-11-20 Thread Mohan Ganesalingam
Back in 2005/2006 all that worked even with PyOpenGL imported under Windows. I'm using boost 1.39 to embed Python 2.6 + PyOpenGL 3 in MSVC 2008 under Windows XP right now, without any difficulties. I'm not using PyOpenGL directly from C++, but have all the relevant code in a file pygl.py, and

Re: [C++-sig] Efficient string passing

2009-11-19 Thread Mohan Ganesalingam
Thank you for the reply! As you spotted, I was making an embarrassingly idiotic typo (due to too much cut and pasting)... it should of course have been handle<> h(result); return object(h); Once that was fixed, everything worked fine. I believe this is impossible: Python trea

[C++-sig] Efficient string passing

2009-11-19 Thread Mohan Ganesalingam
Dear all, I recently sent an e-mail which (I think) didn't reach the list, about trying to return large strings from C++ into Python without copying them. By looking at the C/Python API I've subsequently figured out roughly how to do this... something like Class World { object return