[C++-sig] Return value policy for property (original) (raw)

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() ) )

Koen Van Herck wrote:

Hello,

I have a member function that I've wrapped as .def("getTime", &MyClass::getTime, returnvaluepolicy()) Now I want to call the same function (getTime) as a Python property: .addproperty("time", ???) How do I specify the 'managenewobject' return value policy ? Regards, Koen Van Herck.



More information about the Cplusplus-sig mailing list