diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2013-03-17 23:39:01 +0400 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2013-08-08 13:07:03 +0400 |
commit | 6385fc5ff5d669d3ec99d89f19c5860cf53011ba (patch) | |
tree | 56dfda0bba992c09c7d336600f1844b95d0ae863 /src/config_file.c | |
parent | c7d4904c47d493073b8f816d2b17dcf68eefe26d (diff) |
added new type and several functions to git_strmap
This step is needed to easily add iterators to git_config_backend
As well use these new git_strmap functions to implement foreach
* git_strmap_iter
* git_strmap_has_data(...)
* git_strmap_begin(...)
* git_strmap_end(...)
* git_strmap_next(...)
Diffstat (limited to 'src/config_file.c')
-rw-r--r-- | src/config_file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config_file.c b/src/config_file.c index 570f286c8..088f6190d 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -270,7 +270,8 @@ static int file_foreach( } } - git_strmap_foreach(b->values, key, var, + git_strmap_iter iter = git_strmap_begin(b->values); + while (!(git_strmap_next(&key, (void**) &var, &iter, b->values) < 0)) { for (; var != NULL; var = next_var) { next_var = CVAR_LIST_NEXT(var); @@ -285,7 +286,7 @@ static int file_foreach( goto cleanup; } } - ); + } cleanup: if (regexp != NULL) |