summaryrefslogtreecommitdiff
path: root/lang/python/wiredtiger.i
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-01-17 05:48:03 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-01-17 05:48:03 +1100
commit76addf73581c53f24462ab5fd724048aec36eaf3 (patch)
tree5dee076df3ad7360a111c193c48d3675d7dc9e50 /lang/python/wiredtiger.i
parentae3bd66c8cd2ffa1f0630b035d364a895a4920be (diff)
downloadmongo-76addf73581c53f24462ab5fd724048aec36eaf3.tar.gz
Have WT_CURSOR::equals return 1 when cursors are equal, 0 when not.
Diffstat (limited to 'lang/python/wiredtiger.i')
-rw-r--r--lang/python/wiredtiger.i9
1 files changed, 2 insertions, 7 deletions
diff --git a/lang/python/wiredtiger.i b/lang/python/wiredtiger.i
index 1a23bd5ea5e..7963b5b74c9 100644
--- a/lang/python/wiredtiger.i
+++ b/lang/python/wiredtiger.i
@@ -712,13 +712,8 @@ typedef int int_void;
}
else {
ret = $self->equals($self, other, &cmp);
-
- /*
- * Compare-equal is documented to return 0 and !0, map
- * less-than-zero and greater-than-zero to 1 to avoid
- * colliding with other errors.
- */
- ret = (ret != 0) ? ret : (cmp == 0 ? 0 : 1);
+ if (ret == 0)
+ ret = cmp;
}
return (ret);
}