Sign in to follow this  

Wrap member function to boost python object

This topic is 3837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having some trouble in a program I've written that uses python to script most of a simple GUI using boost python. Now I'd like some of the C++ to also be able to register callbacks. All of the callbacks are stored as boost::python::objects. It seems like there has to be a simple way to wrap a bound member function into this object type but after a couple of hours looking I can't seem to come up with it. I've found the function make_function here which will wrap member function pointers however it won't bind them to an actual object instance. Is there any way to bind the callable object returned by make_function to an actual instance, or is there some other way I need to go about this? Thanks in advance.

Share this post


Link to post
Share on other sites

This topic is 3837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this