diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2010-05-03 10:12:05 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2010-05-03 10:48:38 +0200 |
commit | c096c5cb9ac636626e158ed327b3d9279c4de347 (patch) | |
tree | 3cf37f977cdafaf55220a8ae193110f88410bab9 /dbus/dbus-hash.h | |
parent | f578ad20ef9b6db635c5178651def600fb5ccbe9 (diff) | |
download | dbus-c096c5cb9ac636626e158ed327b3d9279c4de347.tar.gz |
Don't truncate pointers on Windows x64 platform
Diffstat (limited to 'dbus/dbus-hash.h')
-rw-r--r-- | dbus/dbus-hash.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/dbus/dbus-hash.h b/dbus/dbus-hash.h index 78f69ddf..424a9464 100644 --- a/dbus/dbus-hash.h +++ b/dbus/dbus-hash.h @@ -24,6 +24,14 @@ #ifndef DBUS_HASH_H #define DBUS_HASH_H +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#endif + #include <dbus/dbus-memory.h> #include <dbus/dbus-types.h> @@ -61,7 +69,7 @@ typedef enum DBUS_HASH_TWO_STRINGS, /**< Hash key is two strings in one memory block, i.e. foo\\0bar\\0 */ DBUS_HASH_INT, /**< Hash keys are integers. */ DBUS_HASH_POINTER, /**< Hash keys are pointers. */ - DBUS_HASH_ULONG /**< Hash keys are unsigned long. */ + DBUS_HASH_UINTPTR /**< Hash keys are integer capable to hold a pointer. */ } DBusHashType; DBusHashTable* _dbus_hash_table_new (DBusHashType type, @@ -80,7 +88,7 @@ void _dbus_hash_iter_set_value (DBusHashIter *iter, int _dbus_hash_iter_get_int_key (DBusHashIter *iter); const char* _dbus_hash_iter_get_string_key (DBusHashIter *iter); const char* _dbus_hash_iter_get_two_strings_key (DBusHashIter *iter); -unsigned long _dbus_hash_iter_get_ulong_key (DBusHashIter *iter); +uintptr_t _dbus_hash_iter_get_uintptr_key (DBusHashIter *iter); dbus_bool_t _dbus_hash_iter_lookup (DBusHashTable *table, void *key, dbus_bool_t create_if_not_found, @@ -93,8 +101,8 @@ void* _dbus_hash_table_lookup_int (DBusHashTable *table, int key); void* _dbus_hash_table_lookup_pointer (DBusHashTable *table, void *key); -void* _dbus_hash_table_lookup_ulong (DBusHashTable *table, - unsigned long key); +void* _dbus_hash_table_lookup_uintptr (DBusHashTable *table, + uintptr_t key); dbus_bool_t _dbus_hash_table_remove_string (DBusHashTable *table, const char *key); dbus_bool_t _dbus_hash_table_remove_two_strings (DBusHashTable *table, @@ -103,8 +111,8 @@ dbus_bool_t _dbus_hash_table_remove_int (DBusHashTable *table, int key); dbus_bool_t _dbus_hash_table_remove_pointer (DBusHashTable *table, void *key); -dbus_bool_t _dbus_hash_table_remove_ulong (DBusHashTable *table, - unsigned long key); +dbus_bool_t _dbus_hash_table_remove_uintptr (DBusHashTable *table, + uintptr_t key); dbus_bool_t _dbus_hash_table_insert_string (DBusHashTable *table, char *key, void *value); @@ -117,8 +125,8 @@ dbus_bool_t _dbus_hash_table_insert_int (DBusHashTable *table, dbus_bool_t _dbus_hash_table_insert_pointer (DBusHashTable *table, void *key, void *value); -dbus_bool_t _dbus_hash_table_insert_ulong (DBusHashTable *table, - unsigned long key, +dbus_bool_t _dbus_hash_table_insert_uintptr (DBusHashTable *table, + uintptr_t key, void *value); int _dbus_hash_table_get_n_entries (DBusHashTable *table); |