-#define PYCALLBACK_BOOL_DC4DBLBOOL(PCLASS, CBNAME) \
- bool CBNAME(wxDC& a, double b, double c, double d, double e, bool f) {\
- if (m_myInst.findCallback(#CBNAME)) \
- return m_myInst.callCallback(Py_BuildValue("(Oddddi)", \
- wxPyConstructObject(&a, "wxDC"), \
- b, c, d, e, (int)f)); \
- else \
- return PCLASS::CBNAME(a, b, c, d, e, f); \
- } \
- bool base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f) {\
- return PCLASS::CBNAME(a, b, c, d, e, f); \
+#define DEC_PYCALLBACK_BOOL_DC4DBLBOOL(CBNAME) \
+ bool CBNAME(wxDC& a, double b, double c, double d, double e, bool f); \
+ bool base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f);
+
+
+#define IMP_PYCALLBACK_BOOL_DC4DBLBOOL(CLASS, PCLASS, CBNAME) \
+ bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
+ bool doSave = wxPyRestoreThread(); \
+ if (m_myInst.findCallback(#CBNAME)) \
+ return m_myInst.callCallback(Py_BuildValue("(Oddddi)", \
+ wxPyConstructObject(&a, "wxDC"), \
+ b, c, d, e, (int)f)); \
+ else \
+ return PCLASS::CBNAME(a, b, c, d, e, f); \
+ wxPySaveThread(doSave); \
+ } \
+ bool CLASS::base_##CBNAME(wxDC& a, double b, double c, double d, double e, bool f) {\
+ return PCLASS::CBNAME(a, b, c, d, e, f); \