Add testing for command dumping as well

This commit is contained in:
Kovid Goyal
2016-11-14 20:40:54 +05:30
parent 5069b50fb2
commit 44a8cc062e
2 changed files with 21 additions and 6 deletions
+2 -1
View File
@@ -118,7 +118,8 @@ parse_bytes(PyObject UNUSED *self, PyObject *args) {
Py_buffer pybuf;
Screen *screen;
#ifdef DUMP_COMMANDS
if (!PyArg_ParseTuple(args, "OO!y*", &dump_callback, &Screen_Type, &screen, &pybuf)) return NULL;
if (!PyArg_ParseTuple(args, "O!y*O", &Screen_Type, &screen, &pybuf, &dump_callback)) return NULL;
if (!PyCallable_Check(dump_callback)) { PyErr_SetString(PyExc_TypeError, "The dump callback must be a callable object"); return NULL; }
#else
if (!PyArg_ParseTuple(args, "O!y*", &Screen_Type, &screen, &pybuf)) return NULL;
#endif