Use the PyGILState_* APIs on Python >= 2.3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-03-09 22:28:52 +00:00
parent 168f82ce0a
commit 6e6b35578d
37 changed files with 318 additions and 281 deletions

View File

@@ -1816,7 +1816,7 @@ static PyObject *wxPyPolygonShape_GetOriginalPoints(wxPyPolygonShape *self){
wxObject* wxObj;
wxNode* node = list->GetFirst();
bool blocked = wxPyBeginBlockThreads();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
@@ -1855,7 +1855,7 @@ static PyObject *wxDiagram_GetShapeList(wxDiagram *self){
// work for any class for the VERY generic cases, but beyond that the helper
// needs to know more about the type.
wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className) {
bool blocked = wxPyBeginBlockThreads();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads(blocked);
@@ -1888,7 +1888,7 @@ wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className) {
//---------------------------------------------------------------------------
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
bool blocked = wxPyBeginBlockThreads();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads(blocked);
@@ -1960,7 +1960,7 @@ PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) {
wxObject* wxObj;
wxNode* node = list->GetFirst();
bool blocked = wxPyBeginBlockThreads();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
@@ -1981,7 +1981,7 @@ PyObject* wxPy_ConvertShapeList(wxListBase* listbase) {
wxObject* wxObj;
wxNode* node = list->GetFirst();
bool blocked = wxPyBeginBlockThreads();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();