You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/03/24 12:53:12 UTC

[2/3] lucy git commit: Fix bug in Perl implementation of Doc_Equals

Fix bug in Perl implementation of Doc_Equals

Detected by a GCC 5.2 warning.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/56e7c206
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/56e7c206
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/56e7c206

Branch: refs/heads/master
Commit: 56e7c206191862822c1a111af4959283069702d1
Parents: 04bd80f
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Mar 24 12:06:24 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Mar 24 12:52:32 2016 +0100

----------------------------------------------------------------------
 perl/xs/Lucy/Document/Doc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/56e7c206/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index a45f758..902df23 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -228,7 +228,7 @@ LUCY_Doc_Equals_IMP(lucy_Doc *self, cfish_Obj *other) {
     lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
     lucy_DocIVARS *const ovars = lucy_Doc_IVARS((lucy_Doc*)other);
 
-    if (!ivars->doc_id == ovars->doc_id)   { return false; }
+    if (!!ivars->doc_id ^ !!ovars->doc_id) { return false; }
     if (!!ivars->fields ^ !!ovars->fields) { return false; }
 
     // Verify fields.  Don't allow any deep data structures.