// }
-bool wxPyCallbackHelper::findCallback(const char* name) const {
+bool wxPyCallbackHelper::findCallback(const char* name, bool setGuard) const {
wxPyCallbackHelper* self = (wxPyCallbackHelper*)this; // cast away const
PyObject *method, *klass;
PyObject* nameo = PyString_FromString(name);
// ...then we'll save a pointer to the method so callCallback can
// call it. But first, set a recursion guard in case the
// overridden method wants to call the base class version.
- setRecursionGuard(method);
+ if (setGuard)
+ setRecursionGuard(method);
self->m_lastFound = method;
}
else {
cbh.setSelf(self, klass, incref);
}
-bool wxPyCBH_findCallback(const wxPyCallbackHelper& cbh, const char* name) {
- return cbh.findCallback(name);
+bool wxPyCBH_findCallback(const wxPyCallbackHelper& cbh, const char* name, bool setGuard) {
+ return cbh.findCallback(name, setGuard);
}
int wxPyCBH_callCallback(const wxPyCallbackHelper& cbh, PyObject* argTuple) {