[C++-sig] wrapping a function that takes a void*

Matthew Scouten matthew.scouten at gmail.com
Fri Oct 12 18:18:30 CEST 2007

I am wraping a function that takes a void* as an argument.

class Special
	int fooRequest(void * userData = NULL);
	virtual void fooCallback(void * userData)

The intention is that the user data pointer will be returned to
'remind' the program what callback goes with what request.

my first attempt:

struct Special_wrapper: Special, wrapper<Special>
	int fooRequest(PyObject * userData = NULL);

int Special_wrapper::fooRequest(PyObject * userData)
	return  fooRequest((void*) userData)

and later

	.def("fooRequest" ,&Special_wrapper::fooRequest	,(arg("userData") =

I get a error the first line of which is:
C:\Documents and
: error C2027: use of undefined type

(Full error text available on request)

Does any body have any recommendations about how I could wrap this.

More information about the Cplusplus-sig mailing list