Re: [PATCH v1 3/4] hashmap: add simplified hashmap_get_from_hash() API

2014-07-11 Thread Junio C Hamano
Karsten Blees 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 OK. > 2. Simplicity > > Hashmap clients will typically provide small, type safe wrappers around the > hashmap API. OK.

Re: [PATCH v1 3/4] hashmap: add simplified hashmap_get_from_hash() API

2014-07-11 Thread Karsten Blees
Am 07.07.2014 19:43, schrieb Junio C Hamano: > Karsten Blees writes: > >> Hashmap entries are typically looked up by just a key. The hashmap_get() >> API expects an initialized entry structure instead, to support compound >> keys. This flexibility is currently only needed by find_dir_entry() in >

Re: [PATCH v1 3/4] hashmap: add simplified hashmap_get_from_hash() API

2014-07-07 Thread Junio C Hamano
Karsten Blees writes: > Hashmap entries are typically looked up by just a key. The hashmap_get() > API expects an initialized entry structure instead, to support compound > keys. This flexibility is currently only needed by find_dir_entry() in > name-hash.c (and compat/win32/fscache.c in the msys

[PATCH v1 3/4] hashmap: add simplified hashmap_get_from_hash() API

2014-07-02 Thread Karsten Blees
Hashmap entries are typically looked up by just a key. The hashmap_get() API expects an initialized entry structure instead, to support compound keys. This flexibility is currently only needed by find_dir_entry() in name-hash.c (and compat/win32/fscache.c in the msysgit fork). All other (currently