+#define IMP_PYCALLBACK_STRING_LONGLONG(CLASS, PCLASS, CBNAME) \
+ wxString CLASS::CBNAME(long a, long b) const { \
+ wxString rval; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ll)",a,b)); \
+ if (ro) { \
+ PyObject* str = PyObject_Str(ro); \
+ rval = PyString_AsString(str); \
+ Py_DECREF(ro); Py_DECREF(str); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a,b); \
+ return rval; \
+ } \
+ wxString CLASS::base_##CBNAME(long a, long b) const { \
+ return PCLASS::CBNAME(a,b); \
+ }
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_INT_LONG(CBNAME) \
+ int CBNAME(long a) const; \
+ int base_##CBNAME(long a)const ;
+
+
+#define IMP_PYCALLBACK_INT_LONG(CLASS, PCLASS, CBNAME) \
+ int CLASS::CBNAME(long a) const { \
+ int rval=-1; \
+ bool found; \
+ wxPyTState* state = wxPyBeginBlockThreads(); \
+ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
+ PyObject* ro; \
+ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(l)",a)); \
+ if (ro) { \
+ rval = PyInt_AsLong(ro); \
+ Py_DECREF(ro); \
+ } \
+ } \
+ wxPyEndBlockThreads(state); \
+ if (! found) \
+ rval = PCLASS::CBNAME(a); \
+ return rval; \
+ } \
+ int CLASS::base_##CBNAME(long a) const { \
+ return PCLASS::CBNAME(a); \
+ }
+
+
+//---------------------------------------------------------------------------
+
+#define DEC_PYCALLBACK_LISTATTR_LONG(CBNAME) \
+ wxListItemAttr* CBNAME(long a) const; \
+ wxListItemAttr* base_##CBNAME(long a);