struct string_slot_hasher : typed_noop_remove <string_slot>
{
- typedef string_slot value_type;
- typedef string_slot compare_type;
- static inline hashval_t hash (const value_type *);
- static inline bool equal (const value_type *, const compare_type *);
+ typedef string_slot *value_type;
+ typedef string_slot *compare_type;
+ static inline hashval_t hash (const string_slot *);
+ static inline bool equal (const string_slot *, const string_slot *);
};
/* Returns a hash code for DS. Adapted from libiberty's htab_hash_string
to support strings that may not end in '\0'. */
inline hashval_t
-string_slot_hasher::hash (const value_type *ds)
+string_slot_hasher::hash (const string_slot *ds)
{
hashval_t r = ds->len;
int i;
/* Returns nonzero if DS1 and DS2 are equal. */
inline bool
-string_slot_hasher::equal (const value_type *ds1, const compare_type *ds2)
+string_slot_hasher::equal (const string_slot *ds1, const string_slot *ds2)
{
if (ds1->len == ds2->len)
return memcmp (ds1->s, ds2->s, ds1->len) == 0;