[C++-sig] Re: Re: a python property being a reference

Alex alex at glumol.com
Sun Apr 25 18:19:57 CEST 2004


>> add_property("toto", &CToto::get_toto)
>>
>> with CToto::get_toto returning an object reference 
>> it doesn't work caus it needs a return value policy
>> how can i give a return value policy in add_property like in def  ?

>Look in the reference manual for make_getter and make_setter.


I can make a "def_readonly" like with make_getter but how can I make a regular property with that ? I want to use my own "get" fucntion, not the default one boost.python can make with make_getter

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20040425/a142e328/attachment.htm>


More information about the Cplusplus-sig mailing list