-#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
- bool CLASS::CBNAME(wxMouseEvent& e) { \
- bool rval=FALSE; \
- bool found; \
- wxPyTState* state = wxPyBeginBlockThreads(); \
- if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* ro; \
- PyObject* obj = wxPyConstructObject((void*)&e, "wxMouseEvent", 0); \
- ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)",obj)); \
- if (ro) { \
- rval = PyInt_AsLong(ro); \
- Py_DECREF(ro); \
- } \
- Py_DECREF(obj); \
- } \
- wxPyEndBlockThreads(state); \
- if (! found) \
- return PCLASS::CBNAME(e); \
- return rval; \
- } \
- bool CLASS::base_##CBNAME(wxMouseEvent& e) { \
- return PCLASS::CBNAME(e); \
+#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(wxMouseEvent& e) { \
+ bool rval=FALSE; \
+ bool found; \
+ wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ PyObject* obj = wxPyConstructObject((void*)&e, "wxMouseEvent", 0); \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)",obj)); \
+ if (ro) { \
+ rval = PyInt_AsLong(ro); \
+ Py_DECREF(ro); \
+ } \
+ Py_DECREF(obj); \
+ } \
+ wxPyEndBlockThreads(); \
+ if (! found) \
+ return PCLASS::CBNAME(e); \
+ return rval; \
+ } \
+ bool CLASS::base_##CBNAME(wxMouseEvent& e) { \
+ return PCLASS::CBNAME(e); \