]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/drawlist.cpp
Added autoconf makefiles for FoldBar extended samples
[wxWidgets.git] / wxPython / src / drawlist.cpp
index 0c7cd62fe896d1a01cbcc1325f671a66f42ed8ca..c89342ac84dd5d0ee4186e24824872dc08eb2b7c 100644 (file)
@@ -30,7 +30,7 @@ void wxPyDrawList_SetAPIPtr()
 PyObject* wxPyDrawXXXList(wxDC& dc, wxPyDrawListOp_t doDraw,
                           PyObject* pyCoords, PyObject* pyPens, PyObject* pyBrushes)
 {
-    bool blocked = wxPyBeginBlockThreads(); 
+    wxPyBlock_t blocked = wxPyBeginBlockThreads(); 
 
     bool      isFastSeq  = PyList_Check(pyCoords) || PyTuple_Check(pyCoords);
     bool      isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
@@ -215,7 +215,7 @@ bool wxPyDrawXXXPolygon(wxDC& dc, PyObject* coords)
 
 PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyObject* foregroundList, PyObject* backgroundList)
 {
-    bool blocked = wxPyBeginBlockThreads();
+    wxPyBlock_t blocked = wxPyBeginBlockThreads();
 
     bool      isFastSeq  = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
     bool      isFastText = PyList_Check(textList) || PyTuple_Check(textList);
@@ -258,7 +258,7 @@ PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyO
             else {
                 obj = PySequence_GetItem(textList, i);
             }
-            if (! PyString_Check(obj) ) {
+            if (! PyString_Check(obj) && !PyUnicode_Check(obj) ) {
                 Py_DECREF(obj);
                 goto err1;
             }