Re: How to use boost.python to wrap a class with a pure virtual function that has a 'void *' argument

2008-03-22 Thread James Whetstone
eMessage").ptr(), h); } catch (const error_already_set) { // Catch and ignore exception that is thrown if Python // onMessage raised an exception. Print it to sys.stderr, // since there is nothing we can do about it here. PyErr_Print(); } PyGILState_Release(gstate); } "

How to use boost.python to wrap a class with a pure virtual function that has a 'void *' argument

2008-03-22 Thread James Whetstone
As the subject implies, I'm having trouble wrapping a C++ class that looks like this: struct A { virtual void handleMessage(void *message)=0; }; To wrap this class, I've written the following code: struct AWrapper : A, wrapper { void handleMessage(void *message) { this->get

Re: Missing PyObject definition

2008-03-17 Thread James Whetstone
ethod(self, "handleMessage", obj); } Thanks for your suggestions on this, James "Jeff Schwab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > James Whetstone wrote: >> I'm trying to access a PyObject directly from C++ for the purpose of >>

Missing PyObject definition

2008-03-17 Thread James Whetstone
I'm trying to access a PyObject directly from C++ for the purpose of calling method on a Python object that is an intance of a derived C++ class. My problem is that the compiler is complaining about not PyObject not being defined. Has anyone run into the problem? Where is PyObject defined? Th