[C++-sig] How argument passing works with boost python ?

David Abrahams dave at boost-consulting.com
Tue Aug 15 18:33:51 CEST 2006


"Roman Yakovenko" <roman.yakovenko at gmail.com> writes:

> On 8/15/06, David Abrahams <dave at boost-consulting.com> wrote:
>> cbailly <b.christophe at yahoo.fr> writes:
>>
>> > Thanks for your answer
>> >
>> > Can you tell me if my understanding is ok:
>> >
>> > Does it mean that each time a str python object is passed as an
>> > argument, then an automatic conversion is made to std::string type ?
>> > Regardless of the prototype of the method, just because converters
>> > have been registered.
>>
>> No: the prototype of the method is part of the type of the (member)
>> function pointer you pass to def().  The library uses this type
>> information to choose the eligible converters for each parameter.
>
> Can you point to the source code?

Start with make_function.hpp and work your way down from there.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list