Compilation fix. I didn't add a #error since I figured this sample will be
[wxWidgets.git] / wxPython / src / mac / _gdi_wrap.cpp
index 6b2dadb735b24edeca6c43d76e72dd89e4de9172..7456895c53c8d2d585252f519a5efdb042625296 100644 (file)
@@ -1037,7 +1037,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
          PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
                       type, otype);
        }
-       Py_DECREF(str);
+       if (str)
+          Py_DECREF(str);
        return;
       }
     }   
@@ -1721,7 +1722,7 @@ SWIG_Check_int(PyObject* obj)
 static PyObject *wxPen_GetDashes(wxPen *self){
             wxDash* dashes;
             int count = self->GetDashes(&dashes);
-            bool blocked = wxPyBeginBlockThreads();
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();
             PyObject* retval = PyList_New(0);
             for (int x=0; x<count; x++) {
                 PyObject* pyint = PyInt_FromLong(dashes[x]);
@@ -1732,7 +1733,7 @@ static PyObject *wxPen_GetDashes(wxPen *self){
             return retval;
         }
 static void wxPen__SetDashes(wxPen *self,PyObject *_self,PyObject *pyDashes){
-            bool blocked = wxPyBeginBlockThreads();
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();
             int size = PyList_Size(pyDashes);
             wxDash* dashes = (wxDash*)byte_LIST_helper(pyDashes);
 
@@ -19608,7 +19609,7 @@ static PyObject *_wrap_BrushList_FindOrCreateBrush(PyObject *, PyObject *args, P
     PyObject *resultobj;
     wxBrushList *arg1 = (wxBrushList *) 0 ;
     wxColour *arg2 = 0 ;
-    int arg3 ;
+    int arg3 = (int) wxSOLID ;
     wxBrush *result;
     wxColour temp2 ;
     PyObject * obj0 = 0 ;
@@ -19618,16 +19619,18 @@ static PyObject *_wrap_BrushList_FindOrCreateBrush(PyObject *, PyObject *args, P
         (char *) "self",(char *) "colour",(char *) "style", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:BrushList_FindOrCreateBrush",kwnames,&obj0,&obj1,&obj2)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:BrushList_FindOrCreateBrush",kwnames,&obj0,&obj1,&obj2)) goto fail;
     SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxBrushList, SWIG_POINTER_EXCEPTION | 0);
     if (SWIG_arg_fail(1)) SWIG_fail;
     {
         arg2 = &temp2;
         if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail;
     }
-    {
-        arg3 = (int)(SWIG_As_int(obj2)); 
-        if (SWIG_arg_fail(3)) SWIG_fail;
+    if (obj2) {
+        {
+            arg3 = (int)(SWIG_As_int(obj2)); 
+            if (SWIG_arg_fail(3)) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();