summaryrefslogtreecommitdiff
path: root/include/git2/sys/config.h
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-03-18 21:02:36 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-08 11:14:53 +0200
commita603c191578f7b33720e36e95421fcd58bc7abe4 (patch)
tree4de06cb51a580e85e5be38c91bbdfe980b4a55b5 /include/git2/sys/config.h
parent6385fc5ff5d669d3ec99d89f19c5860cf53011ba (diff)
downloadlibgit2-a603c191578f7b33720e36e95421fcd58bc7abe4.tar.gz
replaced foreach() with non callback based iterations in git_config_backend
new functions in struct git_config_backend: * iterator_new(...) * iterator_free(...) * next(...) The old callback based foreach style can still be used with `git_config_backend_foreach_match`
Diffstat (limited to 'include/git2/sys/config.h')
-rw-r--r--include/git2/sys/config.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/git2/sys/config.h b/include/git2/sys/config.h
index 11e59cf03..61dcce544 100644
--- a/include/git2/sys/config.h
+++ b/include/git2/sys/config.h
@@ -35,7 +35,9 @@ struct git_config_backend {
int (*set)(struct git_config_backend *, const char *key, const char *value);
int (*set_multivar)(git_config_backend *cfg, const char *name, const char *regexp, const char *value);
int (*del)(struct git_config_backend *, const char *key);
- int (*foreach)(struct git_config_backend *, const char *, git_config_foreach_cb callback, void *payload);
+ int (*iterator_new)(git_config_backend_iter **, struct git_config_backend *);
+ void (*iterator_free)(git_config_backend_iter *);
+ int (*next)(git_config_backend_iter *, git_config_entry *, struct git_config_backend *);
int (*refresh)(struct git_config_backend *);
void (*free)(struct git_config_backend *);
};