[C++-sig] Boost function call error

Dirgesh Patel dirgesh.patel at hp.com
Wed Aug 24 20:04:52 CEST 2005


so i had this before
def("copy", imageMorph_copy, imageMorph_copy() 
[return_value_policy<manage_new_object>()] );

and i changed it to:
def("copy", static_cast<bkimage 
(*)(bkimage,xint32_t,xint32_t,xint32_t,xint32_t,xint32_t,xint32_t)>(imageMorph_copy), 
imageMorph_copy() [return_value_policy<manage_new_object>()] );

and now i get this error:
../python/imageMorph_boost.cpp: In function `void init_module_imageMorph()':
../python/imageMorph_boost.cpp:108: error: expected primary-expression 
before ')' token

any suggestions...seems like just a syntax error.

thanks


"Dirgesh Patel" <dirgesh.patel at hp.com> wrote in message 
news:ddvos9$oae$1 at sea.gmane.org...
>I have made a .cpp file with boost_python_module inside it and a function 
>call. which looks a little like this:
>
>    def("copy", copy, imageMorph_copy() 
> [return_value_policy<manage_new_object>()] );
>
> with a overloading operator which looks a little like this:
>
> BOOST_PYTHON_FUNCTION_OVERLOADS(imageMorph_copy, copy, 1, 7)
>
> the overloader is correct in terms of syntax because i have other 
> functions i am using in same syntax and it works..just fails on this one.
>
> here is the error i get:
>
> ../python/imageMorph_boost.cpp: In function `void 
> init_module_imageMorph()':
> ../python/imageMorph_boost.cpp:107: error: no matching function for call 
> to `def(const char[5], <unknown type>, 
> boost::python::detail::overloads_proxy<boost::python::return_value_policy<boost::python::manage_new_object, 
> boost::python::default_call_policies>, imageMorph_copy>)'
>
> Any suggestions? i have tried to update my GCC to the latest and greatest.
>
> Thanks 






More information about the Cplusplus-sig mailing list