X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a541c325865cd11d1ba8ef25333b8650b2823c8a..413055db0f047c4a1dca0230b6094f18a65e5f56:/wxPython/src/helpers.h?ds=sidebyside diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index a177f4c7f3..64d394ef00 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -114,7 +114,8 @@ PyObject* wxArrayString2PyList_helper(const wxArrayString& arr); PyObject* wxArrayInt2PyList_helper(const wxArrayInt& arr); -#define RETURN_NONE() { Py_INCREF(Py_None); return Py_None; } +#define RETURN_NONE() { Py_INCREF(Py_None); return Py_None; } +#define DECLARE_DEF_STRING(name) static wxString wxPy##name(wx##name) //---------------------------------------------------------------------- @@ -1145,10 +1146,10 @@ public: wxDragResult CLASS::CBNAME(wxCoord a, wxCoord b, wxDragResult c) { \ int rval=0; \ bool found; \ - wxPyBeginBlockThreads(); \ + wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c));\ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(); \ if (! found) \ rval = PCLASS::CBNAME(a, b, c); \ return (wxDragResult)rval; \ @@ -1164,20 +1165,20 @@ public: #define IMP_PYCALLBACK_FSF_FSSTRING_pure(CLASS, PCLASS, CBNAME) \ wxFSFile* CLASS::CBNAME(wxFileSystem& a,const wxString& b) { \ - wxPyBeginBlockThreads(); \ + wxPyBeginBlockThreads(); \ wxFSFile* rval=0; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ PyObject* obj = wxPyMake_wxObject(&a); \ ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)",\ - obj, wx2PyString)); \ + obj, wx2PyString(b))); \ if (ro) { \ SWIG_GetPtrObj(ro, (void **)&rval, "_wxFSFILE_p"); \ Py_DECREF(ro); \ } \ Py_DECREF(obj); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(); \ return rval; \ };