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 2012/11/13 03:13:13 UTC

[lucy-commits] [12/16] git commit: refs/heads/master - Use macro for 64-bit constants

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/3a62b6bc
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/3a62b6bc
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/3a62b6bc

Branch: refs/heads/master
Commit: 3a62b6bcad5379ac18e7c2acd902f17cbdc77c33
Parents: 6ef989c
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 4 17:06:08 2012 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Nov 12 20:42:11 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/3a62b6bc/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/3a62b6bc/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/3a62b6bc/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*