[C++-sig] Re: wrapping function taking pointer to pointer
David Abrahams
dave at boost-consulting.com
Fri Sep 12 18:01:34 CEST 2003
Jason.Sibthorpe at aculab.com writes:
> Thanks!
>
>>A list of what? is ptrptr expected to be able to change the char*s
>>that the char** points to? Is it expected to be able to change the
>>chars that those char*s point to? What result would you like to see
>>in Python if it does?
> mmm... sorry for the vague problem description
>
>
>>There are no docs for your particular problem. At the moment, there
>>isn't even a way to write a converter which would use the above
>>conversion any time a function accepting a char** was called.
>
> Is it due to insurmountable technical issues, or lack of time, or
> priorities, or a combination thereof?
Surmountable technical issues, a lack of time, and priorities
(working on stuff I'm being paid for). Those technical problems will
probably be surmounted sometime in the next year.
> It seems to me that this sort of thing (automatic conversion) is
> quite desirable.
Automatic conversion is certainly possible. The problem is that your
converter requires intermediate storage for more than a single char*,
which isn't currently supported for a char** converter.
Well, you *can* get the effect you want by specializing
arg_from_python<char**>. That will make the customized conversion
local to the modules which can see the specialization, though.
HTH,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list