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, wrapperA { void handleMessage(void *message) {

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
(), 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); } James Whetstone [EMAIL PROTECTED

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?

Re: Missing PyObject definition

2008-03-17 Thread James Whetstone
news:[EMAIL PROTECTED] James Whetstone wrote: 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