Merge Christoff Holterman's Bug 796137 repair into maint.

This commit is contained in:
John Ralls
2018-09-08 13:20:51 -07:00
3 changed files with 42 additions and 9 deletions

View File

@@ -220,6 +220,28 @@ typedef char gchar;
}
}
%typemap(in) QofIdType {
if (PyUnicode_Check($input)) {
$1 = PyUnicode_AsUTF8($input);
} else if (PyBytes_Check($input)) {
$1 = PyBytes_AsString($input);
} else {
PyErr_SetString(PyExc_TypeError, "not a string or bytes object");
return NULL;
}
}
%typemap(in) QofIdTypeConst {
if (PyUnicode_Check($input)) {
$1 = PyUnicode_AsUTF8($input);
} else if (PyBytes_Check($input)) {
$1 = PyBytes_AsString($input);
} else {
PyErr_SetString(PyExc_TypeError, "not a string or bytes object");
return NULL;
}
}
%typemap(in) GSList *, QofQueryParamList * {
$1 = NULL;
/* Check if is a list */