[C++-sig] Passing C++ objects to Python by reference

Stefan Seefeld seefeld at sympatico.ca
Mon May 29 23:09:34 CEST 2006


Garrick Chin wrote:

> it appears that the C++ object is passed to Python by value instead of
> reference.  Is there a way to specify passing by reference instead of
> value to boost::python?

Yes, see http://boost.org/libs/python/doc/v2/ptr.html#ptr-spec

HTH,
		Stefan




More information about the Cplusplus-sig mailing list