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

Garrick Chin nonexistent.ftp at gmail.com
Mon May 29 23:20:48 CEST 2006


On 5/29/06, Stefan Seefeld <seefeld at sympatico.ca> wrote:
> 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
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>

Ah.  That works very well, thank you!



More information about the Cplusplus-sig mailing list