Adapt for Blob size_t APIs.

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

Branch: refs/heads/master
Commit: 56cabf0ce0f827b15e666a3760cdd54ace6f5d0e
Parents: 90d4a7d
Author: Marvin Humphrey <[email protected]>
Authored: Mon Apr 25 16:37:07 2016 -0700
Committer: Marvin Humphrey <[email protected]>
Committed: Mon Apr 25 16:37:07 2016 -0700

----------------------------------------------------------------------
 core/Lucy/Index/SortFieldWriter.c      | 2 +-
 core/Lucy/Test/Util/TestSortExternal.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/56cabf0c/core/Lucy/Index/SortFieldWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortFieldWriter.c 
b/core/Lucy/Index/SortFieldWriter.c
index 0f57fe7..88c9742 100644
--- a/core/Lucy/Index/SortFieldWriter.c
+++ b/core/Lucy/Index/SortFieldWriter.c
@@ -182,7 +182,7 @@ SortFieldWriter_Add_IMP(SortFieldWriter *self, int32_t 
doc_id, Obj *value) {
         Counter_Add(counter, size);
     }
     else if (ivars->prim_id == FType_BLOB) {
-        int64_t size = Blob_Get_Size((Blob*)value) + 1;
+        int64_t size = (int64_t)Blob_Get_Size((Blob*)value) + 1;
         size = SI_increase_to_word_multiple(size);
         Counter_Add(counter, size);
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/56cabf0c/core/Lucy/Test/Util/TestSortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestSortExternal.c 
b/core/Lucy/Test/Util/TestSortExternal.c
index cb6564f..c648595 100644
--- a/core/Lucy/Test/Util/TestSortExternal.c
+++ b/core/Lucy/Test/Util/TestSortExternal.c
@@ -259,7 +259,7 @@ test_sort_random_strings(TestBatchRunner *runner) {
         for (int i = 0; i < size; ++i) {
             buf[i] = rand();
         }
-        Blob *blob = Blob_new(buf, size);
+        Blob *blob = Blob_new(buf, (size_t)size);
         Vec_Push(blobs, (Obj*)blob);
     }
 

Reply via email to