Use macro for 64-bit constants
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c9e057c7 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c9e057c7 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c9e057c7 Branch: refs/heads/msvc6 Commit: c9e057c7f8f71795912732bfeba470c517407d83 Parents: 4caff28 Author: Nick Wellnhofer <[email protected]> Authored: Sun Nov 4 17:06:08 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Nov 4 17:20:39 2012 +0100 ---------------------------------------------------------------------- clownfish/runtime/core/Clownfish/Test/TestNum.c | 4 ++-- core/Lucy/Test/Object/TestNum.c | 4 ++-- core/Lucy/Test/Search/TestSortSpec.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/c9e057c7/clownfish/runtime/core/Clownfish/Test/TestNum.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/core/Clownfish/Test/TestNum.c b/clownfish/runtime/core/Clownfish/Test/TestNum.c index 9f032bb..f1aa870 100644 --- a/clownfish/runtime/core/Clownfish/Test/TestNum.c +++ b/clownfish/runtime/core/Clownfish/Test/TestNum.c @@ -181,8 +181,8 @@ test_Equals_and_Compare_To(TestBatch *batch) { TEST_TRUE(batch, Int32_Compare_To(i32, (Obj*)f32) < 0, "Integer32 comparison to Float32"); - Int64_Set_Value(i64, 0x6666666666666666LL); - Integer64 *i64_copy = Int64_new(0x6666666666666666LL); + Int64_Set_Value(i64, I64_C(0x6666666666666666)); + Integer64 *i64_copy = Int64_new(I64_C(0x6666666666666666)); TEST_TRUE(batch, Int64_Compare_To(i64, (Obj*)i64_copy) == 0, "Integer64 comparison to same number"); http://git-wip-us.apache.org/repos/asf/lucy/blob/c9e057c7/core/Lucy/Test/Object/TestNum.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Object/TestNum.c b/core/Lucy/Test/Object/TestNum.c index 3200f7f..2abfee5 100644 --- a/core/Lucy/Test/Object/TestNum.c +++ b/core/Lucy/Test/Object/TestNum.c @@ -177,8 +177,8 @@ test_Equals_and_Compare_To(TestBatch *batch) { TEST_TRUE(batch, Int32_Compare_To(i32, (Obj*)f32) < 0, "Integer32 comparison to Float32"); - Int64_Set_Value(i64, 0x6666666666666666LL); - Integer64 *i64_copy = Int64_new(0x6666666666666666LL); + Int64_Set_Value(i64, I64_C(0x6666666666666666)); + Integer64 *i64_copy = Int64_new(I64_C(0x6666666666666666)); TEST_TRUE(batch, Int64_Compare_To(i64, (Obj*)i64_copy) == 0, "Integer64 comparison to same number"); http://git-wip-us.apache.org/repos/asf/lucy/blob/c9e057c7/core/Lucy/Test/Search/TestSortSpec.c ---------------------------------------------------------------------- diff --git a/core/Lucy/Test/Search/TestSortSpec.c b/core/Lucy/Test/Search/TestSortSpec.c index 3ac03d7..2d0fe28 100644 --- a/core/Lucy/Test/Search/TestSortSpec.c +++ b/core/Lucy/Test/Search/TestSortSpec.c @@ -282,7 +282,7 @@ S_random_int32() { static Obj* S_random_int64() { uint64_t num = TestUtils_random_u64(); - return (Obj*)Int64_new(num & 0x7FFFFFFFFFFFFFFFLL); + return (Obj*)Int64_new(num & I64_C(0x7FFFFFFFFFFFFFFF)); } static Obj*
