Am 16.03.2016 um 17:39 schrieb 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
>
The hashmap_iter_first() function al
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
Hello Junio,
On Thu, Mar 17, 2016 at 12:09 AM, Junio C Hamano wrote:
> Alexander Kuleshov writes:
>
>> diff --git a/hashmap.h b/hashmap.h
>> index ab7958a..b8b158c 100644
>> --- a/hashmap.h
>> +++ b/hashmap.h
>> @@ -95,4 +95,11 @@ static inline const char *strintern(const char *string)
>>
Alexander Kuleshov writes:
> diff --git a/hashmap.h b/hashmap.h
> index ab7958a..b8b158c 100644
> --- a/hashmap.h
> +++ b/hashmap.h
> @@ -95,4 +95,11 @@ static inline const char *strintern(const char *string)
> return memintern(string, strlen(string));
> }
>
> +#define for_each_hashmap_e
4 matches
Mail list logo