1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

python: use 'et' as format for ParseTuple with python2

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Noel Power 2018-12-11 15:58:07 +00:00 committed by Douglas Bagnall
parent efc4570d6f
commit a799377029

View File

@ -301,7 +301,9 @@ static PyObject *py_strcasecmp_m(PyObject *self, PyObject *args)
const char *s1 = NULL;
const char *s2 = NULL;
long cmp_result = 0;
if (!PyArg_ParseTuple(args, "eses", "utf8", &s1, "utf8", &s2)) {
if (!PyArg_ParseTuple(args, PYARG_STR_UNI
PYARG_STR_UNI,
"utf8", &s1, "utf8", &s2)) {
return NULL;
}
@ -317,7 +319,9 @@ static PyObject *py_strstr_m(PyObject *self, PyObject *args)
const char *s2 = NULL;
char *strstr_ret = NULL;
PyObject *result = NULL;
if (!PyArg_ParseTuple(args, "eses", "utf8", &s1, "utf8", &s2))
if (!PyArg_ParseTuple(args, PYARG_STR_UNI
PYARG_STR_UNI,
"utf8", &s1, "utf8", &s2))
return NULL;
strstr_ret = strstr_m(s1, s2);