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

David Abrahams dave at boost-consulting.com
Tue Aug 15 14:42:22 CEST 2006


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.

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




More information about the Cplusplus-sig mailing list