diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-03-12 20:44:42 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-05-12 18:35:56 +0100 |
commit | f5e1c1391fa2b1af5f69208d6697b2e991867bbb (patch) | |
tree | 66099f8b33f9fde92cb12205395fc195d84c4e9c /dbus/dbus-hash.h | |
parent | 54395bd5ad281c27f883b1db2849f9568ca8fdd0 (diff) | |
download | dbus-f5e1c1391fa2b1af5f69208d6697b2e991867bbb.tar.gz |
Turn DBusSocket into a type-safe struct, preventing inappropriate conversion
Fix the remaining platform-specific code to look at the struct's
appropriate platform-specific member.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
Diffstat (limited to 'dbus/dbus-hash.h')
-rw-r--r-- | dbus/dbus-hash.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/dbus/dbus-hash.h b/dbus/dbus-hash.h index cc66b283..2898f51c 100644 --- a/dbus/dbus-hash.h +++ b/dbus/dbus-hash.h @@ -159,7 +159,10 @@ static inline DBusPollable _dbus_hash_iter_get_pollable_key (DBusHashIter *iter) { #ifdef DBUS_WIN - return _dbus_hash_iter_get_uintptr_key (iter); + DBusSocket s; + + s.sock = _dbus_hash_iter_get_uintptr_key (iter); + return s; #else return _dbus_hash_iter_get_int_key (iter); #endif @@ -170,7 +173,7 @@ _dbus_hash_table_lookup_pollable (DBusHashTable *table, DBusPollable key) { #ifdef DBUS_WIN - return _dbus_hash_table_lookup_uintptr (table, key); + return _dbus_hash_table_lookup_uintptr (table, key.sock); #else return _dbus_hash_table_lookup_int (table, key); #endif @@ -181,7 +184,7 @@ _dbus_hash_table_remove_pollable (DBusHashTable *table, DBusPollable key) { #ifdef DBUS_WIN - return _dbus_hash_table_remove_uintptr (table, key); + return _dbus_hash_table_remove_uintptr (table, key.sock); #else return _dbus_hash_table_remove_int (table, key); #endif @@ -193,7 +196,7 @@ _dbus_hash_table_insert_pollable (DBusHashTable *table, void *value) { #ifdef DBUS_WIN - return _dbus_hash_table_insert_uintptr (table, key, value); + return _dbus_hash_table_insert_uintptr (table, key.sock, value); #else return _dbus_hash_table_insert_int (table, key, value); #endif |