git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c49145b
)
s4:ldb Python requires that a 'compare' handler return -1, 0 or 1
author
Andrew Bartlett
<abartlet@samba.org>
Fri, 21 Aug 2009 07:50:04 +0000
(17:50 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 21 Aug 2009 07:51:52 +0000
(17:51 +1000)
source4/lib/ldb/pyldb.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/pyldb.c
b/source4/lib/ldb/pyldb.c
index 5825f8853077848dd37f1d6c3c89eb6b6da92e32..d55e0aae7ca23ff5c6bb5620fb511688ac1d9593 100644
(file)
--- a/
source4/lib/ldb/pyldb.c
+++ b/
source4/lib/ldb/pyldb.c
@@
-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)