fix some warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-12-05 18:11:20 +00:00
parent e96d32fb15
commit 9e1729e51c
2 changed files with 4 additions and 2 deletions

View File

@@ -185,9 +185,11 @@ bool wxPySwigInstance_Check(PyObject* obj);
#if PY_VERSION_HEX < 0x02040000
#define wxPyUSE_GIL_STATE 0
typedef bool wxPyBlock_t;
#define wxPyBlock_t_default false
#else
#define wxPyUSE_GIL_STATE 1
typedef PyGILState_STATE wxPyBlock_t;
#define wxPyBlock_t_default PyGILState_UNLOCKED
#endif

View File

@@ -1260,7 +1260,7 @@ wxPyCBInputStream::wxPyCBInputStream(const wxPyCBInputStream& other)
wxPyCBInputStream::~wxPyCBInputStream() {
wxPyBlock_t blocked;
wxPyBlock_t blocked = wxPyBlock_t_default;
if (m_block) blocked = wxPyBeginBlockThreads();
Py_XDECREF(m_read);
Py_XDECREF(m_seek);
@@ -1270,7 +1270,7 @@ wxPyCBInputStream::~wxPyCBInputStream() {
wxPyCBInputStream* wxPyCBInputStream::create(PyObject *py, bool block) {
wxPyBlock_t blocked;
wxPyBlock_t blocked = wxPyBlock_t_default;
if (block) blocked = wxPyBeginBlockThreads();
PyObject* read = getMethod(py, "read");