diff options
author | Cedric Bail <cedric.bail@free.fr> | 2013-11-09 20:07:27 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@free.fr> | 2013-11-09 20:07:27 +0900 |
commit | 44f539e1a3d7fd4892d5dc5b612f4b9d91d3967d (patch) | |
tree | d81fa0c7e177a6122e8f5219d04a8717e717baf8 /src/lib/eina | |
parent | 65c33f63692f67e59a4d2e212d6e23d16b15da7f (diff) |
eina: fix eina_hash_int64 on Windows system.
Diffstat (limited to 'src/lib/eina')
-rw-r--r-- | src/lib/eina/eina_file_common.c | 10 | ||||
-rw-r--r-- | src/lib/eina/eina_file_common.h | 6 | ||||
-rw-r--r-- | src/lib/eina/eina_hash.h | 2 | ||||
-rw-r--r-- | src/lib/eina/eina_inline_hash.x | 4 |
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 | ||
144 | int | 144 | int |
145 | eina_file_map_key_cmp(const unsigned long int *key1, int key1_length EINA_UNUSED, | 145 | eina_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 | ||
152 | int | 152 | int |
153 | eina_file_map_key_hash(const unsigned long int *key, int key_length EINA_UNUSED) | 153 | eina_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 | ||
159 | void * | 159 | void * |
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 |
141 | unsigned int eina_file_map_key_length(const void *key); | 141 | unsigned int eina_file_map_key_length(const void *key); |
142 | int eina_file_map_key_cmp(const unsigned long int *key1, int key1_length, | 142 | int 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); |
144 | int eina_file_map_key_hash(const unsigned long int *key, int key_length); | 144 | int 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 */ |
1027 | static inline int eina_hash_int32(const unsigned int *pkey, | 1027 | static inline int eina_hash_int32(const unsigned int *pkey, |
1028 | int len) EINA_ARG_NONNULL(1); | 1028 | int len) EINA_ARG_NONNULL(1); |
1029 | static inline int eina_hash_int64(const unsigned long int *pkey, | 1029 | static 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/ */ |
1032 | static inline int eina_hash_murmur3(const char *key, | 1032 | static 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 | ||
74 | static inline int | 74 | static inline int |
75 | eina_hash_int64(const unsigned long int *pkey, int len) | 75 | eina_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 | ||