
22 Jul
2007
22 Jul
'07
12:20 a.m.
It's possible to expose free functions through "thin wrappers": void f() { //... } void f_wrapper() { // ... some extra functionality to be done when called from Python only f(); } def("f", f_wrapper); But is it possible to write "thin wrappers" for member functions (without modifying the wrapped class)? struct foo { void f(); }; // f_wrapper defined somehow somewhere class_<foo>("foo") .def("f", f_wrapper???) Thanks, Marcin