Skip to content

Commit 220d1f0

Browse files
committed
Merge pull request opencv#8231 from paroj:pytype
2 parents dcbed8d + 789dc0a commit 220d1f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/python/src2/cv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ static PyObject *pycvCreateButton(PyObject*, PyObject *args, PyObject *kw)
13671367
PyObject *userdata = NULL;
13681368
char* button_name;
13691369
int button_type = 0;
1370-
bool initial_button_state = false;
1370+
int initial_button_state = 0;
13711371

13721372
if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|Oii", (char**)keywords, &button_name, &on_change, &userdata, &button_type, &initial_button_state))
13731373
return NULL;
@@ -1379,7 +1379,7 @@ static PyObject *pycvCreateButton(PyObject*, PyObject *args, PyObject *kw)
13791379
userdata = Py_None;
13801380
}
13811381

1382-
ERRWRAP2(createButton(button_name, OnButtonChange, Py_BuildValue("OO", on_change, userdata), button_type, initial_button_state));
1382+
ERRWRAP2(createButton(button_name, OnButtonChange, Py_BuildValue("OO", on_change, userdata), button_type, initial_button_state != 0));
13831383
Py_RETURN_NONE;
13841384
}
13851385
#endif

0 commit comments

Comments
 (0)