// C++ version.
bool rval = FALSE;
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
if (m_myInst.findCallback("GetDataHere")) {
PyObject* ro;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
Py_DECREF(ro);
}
}
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
return rval;
}
// For this one we simply need to make a string from buf and len
// and send it to the Python method.
bool rval = FALSE;
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
if (m_myInst.findCallback("SetData")) {
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
rval = m_myInst.callCallback(Py_BuildValue("(O)", data));
Py_DECREF(data);
}
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
return rval;
}
%}
wxBitmap wxPyBitmapDataObject::GetBitmap() {
wxBitmap* rval = &wxNullBitmap;
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
if (m_myInst.findCallback("GetBitmap")) {
PyObject* ro;
wxBitmap* ptr;
Py_DECREF(ro);
}
}
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
return *rval;
}
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
if (m_myInst.findCallback("SetBitmap")) {
m_myInst.callCallback(Py_BuildValue("(O)",
wxPyConstructObject((void*)&bitmap, "wxBitmap")));
}
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
}
%}
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) {
bool rval = FALSE;
- wxPyTState* state = wxPyBeginBlockThreads();
+ wxPyBeginBlockThreads();
PyObject* list = wxArrayString2PyList_helper(filenames);
if (m_myInst.findCallback("OnDropFiles"))
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
Py_DECREF(list);
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads();
return rval;
}