[boost.python] void pointer argument problem
Hello, I'm trying to use boost.python to wrap a C function that takes a pointer on a void pointer as an argument. But I'm going wrong to use the example from the FAQ. Could anyone help me on this? my code looks like this: struct void_; BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(void_); int myfunc(char * mychar, void ** mypointer); int myfunc_wrp(char * mychar, void_ ** mypointer){ return myfunc(mychar,(void ** ) mypointer); } ... BOOST_PYTHON_MODULE(mymodule){ def("myfunc", &myfunc_wrp); } later in python I do: import mymodule mystring = " " mypointerobject = 0 mymodule.myfunc(mystring,mypointerobject) and get: Boost.Python.ArgumentError: Python argument types in mymodule.myfunc(str, int) did not match C++ signature: myfunc(char *, struct void_ * *) Are there any advices to solve this problem? thank you for your answers. Kind regards, Michael
michael_gruner@arcor.de writes:
Hello,
I'm trying to use boost.python to wrap a C function that takes a pointer on a void pointer as an argument. But I'm going wrong to use the example from the FAQ. Could anyone help me on this?
Michael, Please bring your questions to the Boost.Python list (http://www.boost.org/more/mailing_lists.htm#cplussig) Thanks. -- Dave Abrahams Boost Consulting www.boost-consulting.com
michael_gruner@arcor.de writes:
Are there any advices to solve this problem?
I suggest you bring Boost.Python questions to the C++-sig: http://www.boost.org/more/mailing_lists.htm/cplussig -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
michael_gruner@arcor.de