Re: [PATCH v2] hashmap API: introduce for_each_hashmap_entry() helper macro

2016-03-19 Thread Karsten Blees
Am 17.03.2016 um 11:38 schrieb Alexander Kuleshov: > This patch introduces the for_each_hashmap_entry() macro for more I'd rather call it 'hashmap_for_each', following the pattern 'operandtype_operation' used throughout git. E.g. we already have 'hashmap_get', not 'get_hashmap_entry'. I realize

[PATCH v2] hashmap API: introduce for_each_hashmap_entry() helper macro

2016-03-19 Thread Alexander Kuleshov
There is common pattern to traverse a hashmap in git source code: hashmap_iter_init(map, &iter); while ((entry = hashmap_iter_next(&iter))) // do something with entry This patch introduces the for_each_hashmap_entry() macro for more simple and clean usage of this patt