1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4:ldb Python requires that a 'compare' handler return -1, 0 or 1

This commit is contained in:
Andrew Bartlett 2009-08-21 17:50:04 +10:00
parent c49145b1ab
commit e71ce2f9e3

View File

@ -211,7 +211,11 @@ static PyObject *py_ldb_dn_check_special(PyLdbDnObject *self, PyObject *args)
static int py_ldb_dn_compare(PyLdbDnObject *dn1, PyLdbDnObject *dn2)
{
return ldb_dn_compare(dn1->dn, dn2->dn);
int ret;
ret = ldb_dn_compare(dn1->dn, dn2->dn);
if (ret < 0) ret = -1;
if (ret > 0) ret = 1;
return ret;
}
static PyObject *py_ldb_dn_get_parent(PyLdbDnObject *self)