[C++-sig] function types as user-defined converters

troy d. straszheim troy at resophonic.com
Wed Jan 6 16:10:54 CET 2010


Ravi wrote:
> On Friday 06 November 2009 14:52:49 troy d. straszheim wrote:
>> Currently, the converter type still leaks out to python in the signature:
>>
>>      class S(Boost.Python.instance)
>>       |  add(...)
>>       |      add( (S)arg1, (object)arg2) -> None :
>>       |
>>       |          C++ signature :
>>       |              void add(S*,to_optional<int> 
>> (*)(boost::python::api::object))
>>
>>
>> converters won't nest:
>>
>>    def("foo", as<returnvalue(arg1, conv1(conv2(arg2)))>(&somefn)); // nah
>>
>> I dont have a mechanism for hooking a user defined converter into the
>> return type.  I'm going to have to think about that one a bit more.
> 
> Did you have any ideas on this, Troy? This is the last bit I think I'd need in 
> order to replace my code with yours.
> 

Hi Ravi,

I haven't looked, I got pulled away.  I hope to be back to this soon though.

-t



More information about the Cplusplus-sig mailing list