Merge pull request #8231 from paroj:pytype
authorMaksim Shabunin <maksim.shabunin@gmail.com>
Mon, 27 Feb 2017 11:17:01 +0000 (11:17 +0000)
committerMaksim Shabunin <maksim.shabunin@gmail.com>
Mon, 27 Feb 2017 11:17:02 +0000 (11:17 +0000)
1  2 
modules/python/src2/cv2.cpp

@@@ -411,11 -411,6 +411,11 @@@ PyObject* pyopencv_from(const Mat& m
      return o;
  }
  
 +template<typename _Tp, int m, int n>
 +PyObject* pyopencv_from(const Matx<_Tp, m, n>& matx)
 +{
 +    return pyopencv_from(Mat(matx));
 +}
  
  typedef struct {
      PyObject_HEAD
@@@ -1367,7 -1362,7 +1367,7 @@@ static PyObject *pycvCreateButton(PyObj
      PyObject *userdata = NULL;
      char* button_name;
      int button_type = 0;
-     bool initial_button_state = false;
+     int initial_button_state = 0;
  
      if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|Oii", (char**)keywords, &button_name, &on_change, &userdata, &button_type, &initial_button_state))
          return NULL;
          userdata = Py_None;
      }
  
-     ERRWRAP2(createButton(button_name, OnButtonChange, Py_BuildValue("OO", on_change, userdata), button_type, initial_button_state));
+     ERRWRAP2(createButton(button_name, OnButtonChange, Py_BuildValue("OO", on_change, userdata), button_type, initial_button_state != 0));
      Py_RETURN_NONE;
  }
  #endif