[C++-sig] Return value policy for property

Roman Yakovenko roman.yakovenko at gmail.com
Mon Dec 12 14:36:22 CET 2005


On 12/12/05, Koen Van Herck <koen_van_herck at yahoo.com> wrote:
> Hello,
>
> I have a member function that I've wrapped as
> .def("getTime", &MyClass::getTime, return_value_policy<manage_new_object>())
>
> Now I want to call the same function (getTime) as a Python property:
> .add_property("time", ???)
>
> How do I specify the 'manage_new_object' return value policy ?

I think, that you can not do this, without modifying boost.python library.

> Regards,
> Koen Van Herck.
>

Roman Yakovenko



More information about the Cplusplus-sig mailing list