[C++-sig] Return value policy for property
Jason Kankiewicz
jkankiewicz at advpubtech.com
Mon Dec 12 16:54:36 CET 2005
This type of construct works for me:
.add_property(
"Time"
, make_function(
&MyClass::getTime
, return_value_policy<manage_new_object>()
)
)
Koen Van Herck 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 ?
>
> Regards,
> Koen Van Herck.
More information about the Cplusplus-sig
mailing list