X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23f8f9853ea023c98713e4e9d32a9ed5261b9402..c437fde9f90fc7dfcac79053d214fc9146d7be21:/wxPython/src/_dataobj.i diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index e2d83d1eb3..84ecb3802a 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -243,7 +243,7 @@ in the given direction.", ""); wxDataFormat* formats = new wxDataFormat[count]; self->GetAllFormats(formats, dir); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* list = PyList_New(count); for (size_t i=0; iGetDataSize(format); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (size) { char* buf = new char[size]; if (self->GetDataHere(format, buf)) @@ -301,7 +301,7 @@ in the given direction.", ""); %extend { bool SetData(const wxDataFormat& format, PyObject* data) { bool rval; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (PyString_Check(data)) { rval = self->SetData(format, PyString_Size(data), PyString_AsString(data)); } @@ -363,7 +363,7 @@ supports rendering its data.", ""); PyObject* GetDataHere() { PyObject* rval = NULL; size_t size = self->GetDataSize(); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (size) { char* buf = new char[size]; if (self->GetDataHere(buf)) @@ -388,7 +388,7 @@ derived class if the object supports setting its data. %extend { bool SetData(PyObject* data) { bool rval; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (PyString_Check(data)) { rval = self->SetData(PyString_Size(data), PyString_AsString(data)); } @@ -428,7 +428,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const { // C++ version. bool rval = false; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) { PyObject* ro; ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); @@ -447,7 +447,7 @@ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{ // For this one we simply need to make a string from buf and len // and send it to the Python method. bool rval = false; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "SetData")) { PyObject* data = PyString_FromStringAndSize((char*)buf, len); rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", data)); @@ -665,7 +665,7 @@ public: wxBitmap wxPyBitmapDataObject::GetBitmap() const { wxBitmap* rval = &wxNullBitmap; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "GetBitmap")) { PyObject* ro; wxBitmap* ptr; @@ -681,7 +681,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() const { } void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) { PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), false); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo)); @@ -764,7 +764,7 @@ public: %extend { bool SetData(PyObject* data) { bool rval; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (PyString_Check(data)) { rval = self->SetData(PyString_Size(data), PyString_AsString(data)); } @@ -790,7 +790,7 @@ public: %extend { PyObject* GetData() { PyObject* obj; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); obj = PyString_FromStringAndSize((char*)self->GetData(), self->GetSize()); wxPyEndBlockThreads(blocked); return obj;