[C++-sig] non const std::string* as argument
Max Ivanov
ivanov.maxim at gmail.com
Thu Aug 21 12:31:31 CEST 2008
>> std::string& wrap_SerializeToString(const gp::Message& msg) {
>> std::string tmp;
>> msg.SerializeToString(&tmp);
>> return tmp;
>> };
>
> Just remove reference from return type and you should be fine.
I've remove reference and bp::return_value_policy... from .def and
everything goes fine now, thanks again.
>> Message class is base class for Link which I
>> try to export to python, but Link never overrides SerializeToString.
>
> What?
I've Link class which I tried to export to Python Initially, which is
subclass of Message.
> Take a look on Py++ "Function Transformation" feature:
> http://language-binding.net/pyplusplus/documentation/functions/transformation/transformation.html
>
> It deals with such "wrappers".
Lot's of nice docs there, nice.
More information about the Cplusplus-sig
mailing list