diff --git a/daemon/ice.c b/daemon/ice.c index e44cf9789..cc0b85190 100644 --- a/daemon/ice.c +++ b/daemon/ice.c @@ -303,7 +303,7 @@ static struct ice_candidate_pair *__pair_candidate(stream_fd *sfd, struct ice_ag } static unsigned int __pair_hash(const struct ice_candidate_pair *pair) { - return g_direct_hash(pair->local_intf) ^ g_direct_hash(pair->remote_candidate); + return GPOINTER_TO_UINT(pair->local_intf) ^ GPOINTER_TO_UINT(pair->remote_candidate); } static int __pair_equal(const struct ice_candidate_pair *A, const struct ice_candidate_pair *B) { return A->local_intf == B->local_intf @@ -970,7 +970,7 @@ static void __cand_ice_foundation(call_t *call, struct ice_candidate *cand) { int len; len = sprintf(buf, "%x%x%x", endpoint_hash(&cand->endpoint), - cand->type, g_direct_hash(cand->transport)); + cand->type, GPOINTER_TO_UINT(cand->transport)); cand->foundation = call_str_cpy_len(buf, len); } diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 019b7b4be..f380cc9e3 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -646,14 +646,14 @@ static struct logical_intf *__get_logical_interface(const str *name, sockfamily_ } static unsigned int __name_family_hash(const struct intf_key *lif) { - return str_hash(&lif->name) ^ g_direct_hash(lif->preferred_family); + return str_hash(&lif->name) ^ GPOINTER_TO_UINT(lif->preferred_family); } static int __name_family_eq(const struct intf_key *A, const struct intf_key *B) { return str_equal(&A->name, &B->name) && A->preferred_family == B->preferred_family; } static unsigned int __addr_type_hash(const struct intf_address *addr) { - return sockaddr_hash(&addr->addr) ^ g_direct_hash(addr->type); + return sockaddr_hash(&addr->addr) ^ GPOINTER_TO_UINT(addr->type); } static int __addr_type_eq(const struct intf_address *A, const struct intf_address *B) { return sockaddr_eq(&A->addr, &B->addr) && A->type == B->type; diff --git a/lib/containers.h b/lib/containers.h index 25fc2f0e0..e8e87e2c9 100644 --- a/lib/containers.h +++ b/lib/containers.h @@ -143,7 +143,7 @@ static inline void g_queue_clear_full(GQueue *q, GDestroyNotify free_func) { #define TYPED_DIRECT_FUNCS(hash_name, eq_name, type) \ static inline unsigned int hash_name(const type *a) { \ - return g_direct_hash(a); \ + return GPOINTER_TO_UINT(a); \ } \ static inline gboolean eq_name(const type *a, const type *b) { \ return a == b; \ diff --git a/lib/socket.c b/lib/socket.c index 4de4a84cd..9b7438165 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -526,7 +526,7 @@ static unsigned int __ip6_packet_header(unsigned char *out, const endpoint_t *sr unsigned int sockaddr_hash(const sockaddr_t *a) { - return a->family->hash(a) ^ g_direct_hash(a->family); + return a->family->hash(a) ^ GPOINTER_TO_UINT(a->family); } bool sockaddr_eq(const sockaddr_t *a, const sockaddr_t *b) { return a->family == b->family && a->family->eq(a, b);