forked from enlightenment/efl
eina: fix eina_hash_int64 on Windows system.
This commit is contained in:
parent
65c33f6369
commit
44f539e1a3
|
@ -255,8 +255,8 @@ _part_lookup_key_pc_hash(const void *key, int key_length EINA_UNUSED)
|
|||
if (a->stable)
|
||||
{
|
||||
#ifdef EFL64
|
||||
return eina_hash_int64((uintptr_t *) &a->pc, sizeof (void*)) ^
|
||||
eina_hash_int64((uintptr_t *) &a->mem.dest, sizeof (void*));
|
||||
return eina_hash_int64((unsigned long long int *) &a->pc, sizeof (void*)) ^
|
||||
eina_hash_int64((unsigned long long int *) &a->mem.dest, sizeof (void*));
|
||||
#else
|
||||
return eina_hash_int32((uintptr_t *) &a->pc, sizeof (void*)) ^
|
||||
eina_hash_int32((uintptr_t *) &a->mem.dest, sizeof (void*));
|
||||
|
@ -265,8 +265,8 @@ _part_lookup_key_pc_hash(const void *key, int key_length EINA_UNUSED)
|
|||
else
|
||||
{
|
||||
#ifdef EFL64
|
||||
return eina_hash_int64((uintptr_t *) &a->pc, sizeof (void*)) ^
|
||||
eina_hash_int64((uintptr_t *) &a->mem.reallocated.base, sizeof (void*)) ^
|
||||
return eina_hash_int64((unsigned long long int *) &a->pc, sizeof (void*)) ^
|
||||
eina_hash_int64((unsigned long long int *) &a->mem.reallocated.base, sizeof (void*)) ^
|
||||
eina_hash_int32((unsigned int *) &a->mem.reallocated.offset, sizeof (int));
|
||||
#else
|
||||
return eina_hash_int32((uintptr_t *) &a->pc, sizeof (void*)) ^
|
||||
|
@ -299,7 +299,7 @@ _part_lookup_key_hash(const void *key, int key_length EINA_UNUSED)
|
|||
if (a->stable)
|
||||
{
|
||||
#ifdef EFL64
|
||||
return eina_hash_int64((uintptr_t *) &a->mem.dest, sizeof (void*));
|
||||
return eina_hash_int64((unsigned long long int *) &a->mem.dest, sizeof (void*));
|
||||
#else
|
||||
return eina_hash_int32((uintptr_t *) &a->mem.dest, sizeof (void*));
|
||||
#endif
|
||||
|
@ -307,7 +307,7 @@ _part_lookup_key_hash(const void *key, int key_length EINA_UNUSED)
|
|||
else
|
||||
{
|
||||
#ifdef EFL64
|
||||
return eina_hash_int64((uintptr_t *) &a->mem.reallocated.base, sizeof (void*)) ^
|
||||
return eina_hash_int64((unsigned long long int *) &a->mem.reallocated.base, sizeof (void*)) ^
|
||||
eina_hash_int32((unsigned int *) &a->mem.reallocated.offset, sizeof (int));
|
||||
#else
|
||||
return eina_hash_int32((uintptr_t *) &a->mem.reallocated.base, sizeof (void*)) ^
|
||||
|
|
|
@ -37,9 +37,9 @@ _edje_signal_match_key_hash(const void *key, int key_length EINA_UNUSED)
|
|||
for (i = 0; i < a->matches_count; ++i)
|
||||
{
|
||||
#ifdef EFL64
|
||||
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
#else
|
||||
hash ^= eina_hash_int32((const unsigned int*) a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int32((const unsigned int*) a->matches[i].source, sizeof (char *));
|
||||
|
|
|
@ -142,18 +142,18 @@ eina_file_map_key_length(const void *key EINA_UNUSED)
|
|||
}
|
||||
|
||||
int
|
||||
eina_file_map_key_cmp(const unsigned long int *key1, int key1_length EINA_UNUSED,
|
||||
const unsigned long int *key2, int key2_length EINA_UNUSED)
|
||||
eina_file_map_key_cmp(const unsigned long long int *key1, int key1_length EINA_UNUSED,
|
||||
const unsigned long long int *key2, int key2_length EINA_UNUSED)
|
||||
{
|
||||
if (key1[0] - key2[0] == 0) return key1[1] - key2[1];
|
||||
return key1[0] - key2[0];
|
||||
}
|
||||
|
||||
int
|
||||
eina_file_map_key_hash(const unsigned long int *key, int key_length EINA_UNUSED)
|
||||
eina_file_map_key_hash(const unsigned long long int *key, int key_length EINA_UNUSED)
|
||||
{
|
||||
return eina_hash_int64(&key[0], sizeof (unsigned long int))
|
||||
^ eina_hash_int64(&key[1], sizeof (unsigned long int));
|
||||
return eina_hash_int64(&key[0], sizeof (unsigned long long int))
|
||||
^ eina_hash_int64(&key[1], sizeof (unsigned long long int));
|
||||
}
|
||||
|
||||
void *
|
||||
|
|
|
@ -139,8 +139,8 @@ void eina_file_virtual_map_free(Eina_File *file, void *map);
|
|||
|
||||
// Common hash function
|
||||
unsigned int eina_file_map_key_length(const void *key);
|
||||
int eina_file_map_key_cmp(const unsigned long int *key1, int key1_length,
|
||||
const unsigned long int *key2, int key2_length);
|
||||
int eina_file_map_key_hash(const unsigned long int *key, int key_length);
|
||||
int eina_file_map_key_cmp(const unsigned long long int *key1, int key1_length,
|
||||
const unsigned long long int *key2, int key2_length);
|
||||
int eina_file_map_key_hash(const unsigned long long int *key, int key_length);
|
||||
|
||||
#endif /* EINA_FILE_COMMON_H_ */
|
||||
|
|
|
@ -1026,7 +1026,7 @@ static inline int eina_hash_djb2_len(const char *key,
|
|||
/* Hash function from http://www.concentric.net/~Ttwang/tech/inthash.htm */
|
||||
static inline int eina_hash_int32(const unsigned int *pkey,
|
||||
int len) EINA_ARG_NONNULL(1);
|
||||
static inline int eina_hash_int64(const unsigned long int *pkey,
|
||||
static inline int eina_hash_int64(const unsigned long long int *pkey,
|
||||
int len) EINA_ARG_NONNULL(1);
|
||||
/* http://sites.google.com/site/murmurhash/ */
|
||||
static inline int eina_hash_murmur3(const char *key,
|
||||
|
|
|
@ -72,9 +72,9 @@ eina_hash_int32(const unsigned int *pkey, int len)
|
|||
}
|
||||
|
||||
static inline int
|
||||
eina_hash_int64(const unsigned long int *pkey, int len)
|
||||
eina_hash_int64(const unsigned long long int *pkey, int len)
|
||||
{
|
||||
unsigned long int key = *pkey;
|
||||
unsigned long long int key = *pkey;
|
||||
|
||||
(void) len;
|
||||
|
||||
|
|
|
@ -1893,11 +1893,11 @@ ethumb_key_cmp(const void *key1, EINA_UNUSED int key1_length,
|
|||
|
||||
#define HASH_PARAM_I(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);
|
||||
#ifdef EFL64
|
||||
# define HASH_PARAM_P(Param) r ^= eina_hash_int64((unsigned long int*) &e->Param, 0);
|
||||
# define HASH_PARAM_P(Param) r ^= eina_hash_int64((unsigned long long int*) &e->Param, 0);
|
||||
#else
|
||||
# define HASH_PARAM_P(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);
|
||||
#endif
|
||||
#define HASH_PARAM_D(Param) r ^= eina_hash_int64((unsigned long int*)&e->Param, 0);
|
||||
#define HASH_PARAM_D(Param) r ^= eina_hash_int64((unsigned long long int*)&e->Param, 0);
|
||||
#define HASH_PARAM_F(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);
|
||||
|
||||
EAPI int
|
||||
|
|
Loading…
Reference in New Issue