Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-03-17 23:39:01 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-08 13:07:03 +0400
commit6385fc5ff5d669d3ec99d89f19c5860cf53011ba (patch)
tree56dfda0bba992c09c7d336600f1844b95d0ae863 /src/config_file.c
parentc7d4904c47d493073b8f816d2b17dcf68eefe26d (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.c5
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)