Adapt for changed BitVector return value APIs. BitVec counts and sizes are now measured in size_t not uint32_t.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/71d7edd2 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/71d7edd2 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/71d7edd2 Branch: refs/heads/master Commit: 71d7edd2c2c1eeaf1a1b4e8b9a01a621b53180d4 Parents: e03b8c7 Author: Marvin Humphrey <[email protected]> Authored: Wed Apr 6 18:00:30 2016 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Tue Apr 12 21:38:55 2016 -0700 ---------------------------------------------------------------------- core/Lucy/Index/BitVecDelDocs.c | 4 ++-- core/Lucy/Index/DeletionsWriter.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/71d7edd2/core/Lucy/Index/BitVecDelDocs.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Index/BitVecDelDocs.c b/core/Lucy/Index/BitVecDelDocs.c index 4cd1e50..30dcb98 100644 --- a/core/Lucy/Index/BitVecDelDocs.c +++ b/core/Lucy/Index/BitVecDelDocs.c @@ -40,9 +40,9 @@ BitVecDelDocs_init(BitVecDelDocs *self, Folder *folder, RETHROW(error); } // Cast away const-ness of buffer as we have no immutable BitVector. - int32_t len = (int32_t)InStream_Length(ivars->instream); + int64_t len = InStream_Length(ivars->instream); ivars->bits = (uint8_t*)InStream_Buf(ivars->instream, len); - ivars->cap = (uint32_t)(len * 8); + ivars->cap = (size_t)(len * 8); return self; } http://git-wip-us.apache.org/repos/asf/lucy/blob/71d7edd2/core/Lucy/Index/DeletionsWriter.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Index/DeletionsWriter.c b/core/Lucy/Index/DeletionsWriter.c index adf0d53..c9c8899 100644 --- a/core/Lucy/Index/DeletionsWriter.c +++ b/core/Lucy/Index/DeletionsWriter.c @@ -152,8 +152,8 @@ DefDelWriter_Finish_IMP(DefaultDeletionsWriter *self) { if (ivars->updated[i]) { BitVector *deldocs = (BitVector*)Vec_Fetch(ivars->bit_vecs, i); int32_t doc_max = SegReader_Doc_Max(seg_reader); - uint32_t byte_size = (((uint32_t)doc_max + 1) + 7) / 8; - uint32_t new_max = byte_size * 8 - 1; + size_t byte_size = (((size_t)doc_max + 1) + 7) / 8; + size_t new_max = byte_size * 8 - 1; String *filename = S_del_filename(self, seg_reader); OutStream *outstream = Folder_Open_Out(folder, filename); if (!outstream) { RETHROW(INCREF(Err_get_error())); } @@ -246,7 +246,7 @@ DefDelWriter_Seg_Del_Count_IMP(DefaultDeletionsWriter *self, BitVector *deldocs = tick ? (BitVector*)Vec_Fetch(ivars->bit_vecs, Int_Get_Value(tick)) : NULL; - return deldocs ? BitVec_Count(deldocs) : 0; + return deldocs ? (int32_t)BitVec_Count(deldocs) : 0; } void
