X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80cb3dbc364c10cfe9b2201eeacf95a24656bdc5..e9159fe8e8f1b3653c506805cbb79280aa2a0f38:/wxPython/contrib/glcanvas/mac/glcanvas.cpp diff --git a/wxPython/contrib/glcanvas/mac/glcanvas.cpp b/wxPython/contrib/glcanvas/mac/glcanvas.cpp index 7d57c3cff4..80c3fe24d3 100644 --- a/wxPython/contrib/glcanvas/mac/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/mac/glcanvas.cpp @@ -89,12 +89,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -124,10 +118,11 @@ static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxGLContext(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxGLContext(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -151,10 +146,11 @@ static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLContext_SetCurrent(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLContext_SetCurrent(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -179,10 +175,11 @@ static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLContext_SetColour(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLContext_SetColour(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -206,10 +203,11 @@ static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLContext_SwapBuffers(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLContext_SwapBuffers(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -234,10 +232,11 @@ static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxWindow *)wxGLContext_GetWindow(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindow *)wxGLContext_GetWindow(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -332,10 +331,11 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -424,10 +424,11 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGLCanvas *)new_wxGLCanvasWithContext(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -459,10 +460,11 @@ static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLCanvas_SetCurrent(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLCanvas_SetCurrent(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -487,10 +489,11 @@ static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLCanvas_SetColour(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLCanvas_SetColour(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -514,10 +517,11 @@ static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGLCanvas_SwapBuffers(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGLCanvas_SwapBuffers(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -543,10 +547,11 @@ static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGLContext *)wxGLCanvas_GetContext(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p"); _resultobj = Py_BuildValue("s",_ptemp);