summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-11-09 20:07:27 +0900
committerCedric Bail <cedric.bail@free.fr>2013-11-09 20:07:27 +0900
commit44f539e1a3d7fd4892d5dc5b612f4b9d91d3967d (patch)
treed81fa0c7e177a6122e8f5219d04a8717e717baf8 /src/lib/eina
parent65c33f63692f67e59a4d2e212d6e23d16b15da7f (diff)
eina: fix eina_hash_int64 on Windows system.
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_file_common.c10
-rw-r--r--src/lib/eina/eina_file_common.h6
-rw-r--r--src/lib/eina/eina_hash.h2
-rw-r--r--src/lib/eina/eina_inline_hash.x4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 5a0250cc4a..7b05b3b249 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -142,18 +142,18 @@ eina_file_map_key_length(const void *key EINA_UNUSED)
142} 142}
143 143
144int 144int
145eina_file_map_key_cmp(const unsigned long int *key1, int key1_length EINA_UNUSED, 145eina_file_map_key_cmp(const unsigned long long int *key1, int key1_length EINA_UNUSED,
146 const unsigned long int *key2, int key2_length EINA_UNUSED) 146 const unsigned long long int *key2, int key2_length EINA_UNUSED)
147{ 147{
148 if (key1[0] - key2[0] == 0) return key1[1] - key2[1]; 148 if (key1[0] - key2[0] == 0) return key1[1] - key2[1];
149 return key1[0] - key2[0]; 149 return key1[0] - key2[0];
150} 150}
151 151
152int 152int
153eina_file_map_key_hash(const unsigned long int *key, int key_length EINA_UNUSED) 153eina_file_map_key_hash(const unsigned long long int *key, int key_length EINA_UNUSED)
154{ 154{
155 return eina_hash_int64(&key[0], sizeof (unsigned long int)) 155 return eina_hash_int64(&key[0], sizeof (unsigned long long int))
156 ^ eina_hash_int64(&key[1], sizeof (unsigned long int)); 156 ^ eina_hash_int64(&key[1], sizeof (unsigned long long int));
157} 157}
158 158
159void * 159void *
diff --git a/src/lib/eina/eina_file_common.h b/src/lib/eina/eina_file_common.h
index 06e9a93143..0ac704d028 100644
--- a/src/lib/eina/eina_file_common.h
+++ b/src/lib/eina/eina_file_common.h
@@ -139,8 +139,8 @@ void eina_file_virtual_map_free(Eina_File *file, void *map);
139 139
140// Common hash function 140// Common hash function
141unsigned int eina_file_map_key_length(const void *key); 141unsigned int eina_file_map_key_length(const void *key);
142int eina_file_map_key_cmp(const unsigned long int *key1, int key1_length, 142int eina_file_map_key_cmp(const unsigned long long int *key1, int key1_length,
143 const unsigned long int *key2, int key2_length); 143 const unsigned long long int *key2, int key2_length);
144int eina_file_map_key_hash(const unsigned long int *key, int key_length); 144int eina_file_map_key_hash(const unsigned long long int *key, int key_length);
145 145
146#endif /* EINA_FILE_COMMON_H_ */ 146#endif /* EINA_FILE_COMMON_H_ */
diff --git a/src/lib/eina/eina_hash.h b/src/lib/eina/eina_hash.h
index 4f4aac9a50..c75db25b47 100644
--- a/src/lib/eina/eina_hash.h
+++ b/src/lib/eina/eina_hash.h
@@ -1026,7 +1026,7 @@ static inline int eina_hash_djb2_len(const char *key,
1026/* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */ 1026/* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */
1027static inline int eina_hash_int32(const unsigned int *pkey, 1027static inline int eina_hash_int32(const unsigned int *pkey,
1028 int len) EINA_ARG_NONNULL(1); 1028 int len) EINA_ARG_NONNULL(1);
1029static inline int eina_hash_int64(const unsigned long int *pkey, 1029static inline int eina_hash_int64(const unsigned long long int *pkey,
1030 int len) EINA_ARG_NONNULL(1); 1030 int len) EINA_ARG_NONNULL(1);
1031/* http://sites.google.com/site/murmurhash/ */ 1031/* http://sites.google.com/site/murmurhash/ */
1032static inline int eina_hash_murmur3(const char *key, 1032static inline int eina_hash_murmur3(const char *key,
diff --git a/src/lib/eina/eina_inline_hash.x b/src/lib/eina/eina_inline_hash.x
index 29264b15eb..630e3479ba 100644
--- a/src/lib/eina/eina_inline_hash.x
+++ b/src/lib/eina/eina_inline_hash.x
@@ -72,9 +72,9 @@ eina_hash_int32(const unsigned int *pkey, int len)
72} 72}
73 73
74static inline int 74static inline int
75eina_hash_int64(const unsigned long int *pkey, int len) 75eina_hash_int64(const unsigned long long int *pkey, int len)
76{ 76{
77 unsigned long int key = *pkey; 77 unsigned long long int key = *pkey;
78 78
79 (void) len; 79 (void) len;
80 80