[C++-sig] lvalue converter - pass by reference (non-const)

Hans Meine meine at informatik.uni-hamburg.de
Thu May 15 17:51:23 CEST 2008


Am Donnerstag, 15. Mai 2008 17:02:40 schrieb Moe Goldberg:
> void my_func(cpp_obj& co)
> {
>     co.modify();
> }
>
> then in python I want to call:
>  >>>  po = my_mod.py_obj()
>  >>>  my_mod.my_func(po)
>
> Is there a way to do this without manually wrapping myfunc?

Let me ask the other way round: Is there a way to prevent this from working 
without manually wrapping myfunc? ;-)

-- 
Ciao, /  /
     /--/
    /  / ANS



More information about the Cplusplus-sig mailing list