1 #ifndef HASH_DECL_H 2 #define HASH_DECL_H 3 4 #define HASH_TABLE_UNION(key_type, value_type) { \ 5 struct hash_table *_table; \ 6 key_type _key; \ 7 key_type *_keyp; \ 8 const key_type _const_key; \ 9 value_type _value; \ 10 value_type *_valuep; \ 11 } 12 13 #define HASH_TABLE_DEFINE_TYPE(name, key_type, value_type) \ 14 union hash ## __ ## name HASH_TABLE_UNION(key_type, value_type) 15 #define HASH_TABLE(key_type, value_type) \ 16 union HASH_TABLE_UNION(key_type, value_type) 17 #define HASH_TABLE_TYPE(name) \ 18 union hash ## __ ## name 19 20 #endif 21