[pygccxml-development] Problem with typedefs
Brought to you by:
mbaas,
roman_yakovenko
From: Rodrigue C. <rod...@ho...> - 2006-04-21 03:31:39
|
Hi Roman, It seems I have found a bug with typedefs. When using typedef types in = default arguments, the namespace qualifier gets lost on the default = argument.=20 The following code will produce the error: namespace core { struct foo { foo(){} }; typedef foo fooType; } void* func( const core::fooType& position =3D core::fooType() ); Will produce the following. Notice that fooType should be = core::fooType(). =20 bp::def( "func" , &func , ( bp::arg("arg0")=3DfooType() ) , bp::return_value_policy< bp::return_opaque_pointer, = bp::default_call_policies >() ); =20 Not using the typedef produces the correct output. void* func2( const core::foo& position =3D core::foo() ); bp::def( "func2" , &func2 , ( bp::arg("arg0")=3D::core::foo( ) ) , bp::return_value_policy< bp::return_opaque_pointer, = bp::default_call_policies >() ); I will look on my side to see if I can fix it but I am still learning = the library :) Thanks for the great work. Rod |