mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #8231 from paroj:pytype
This commit is contained in:
commit
220d1f0b3e
@ -1367,7 +1367,7 @@ static PyObject *pycvCreateButton(PyObject*, PyObject *args, PyObject *kw)
|
|||||||
PyObject *userdata = NULL;
|
PyObject *userdata = NULL;
|
||||||
char* button_name;
|
char* button_name;
|
||||||
int button_type = 0;
|
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))
|
if (!PyArg_ParseTupleAndKeywords(args, kw, "sO|Oii", (char**)keywords, &button_name, &on_change, &userdata, &button_type, &initial_button_state))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1379,7 +1379,7 @@ static PyObject *pycvCreateButton(PyObject*, PyObject *args, PyObject *kw)
|
|||||||
userdata = Py_None;
|
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;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user