Karsten Blees <karsten.bl...@gmail.com> writes:

>> In other words, why isn't hashmap_get() more like this:
>>  ...
>> with hashmap_entry_init() purely a static helper in hashmap.c?
> 1. Performance


> 2. Simplicity
> Hashmap clients will typically provide small, type safe wrappers around the
> hashmap API.


> 3. Compound keys
> The key doesn't always consist of just a single word. E.g. for struct
> dir_entry, the key is [char *name, int len]. So an API like this:
>   void *hashmap_get(const struct hashmap *map, const void *key)
> won't do in the general case (unless you require clients to define their
> own key structure in addition to the entry structure...).

Yeah, I was being silly.  Thanks.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to