diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-08 16:18:07 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-08 16:18:07 +0200 |
commit | 3a7ffc29c9416c5d182835c7f18c04437366f218 (patch) | |
tree | b977e17df23436ebb15521bbfc280ec102be6ee0 /include/git2/sys | |
parent | eba7399251cfa95d9346b9b41ca78dc5d43a840d (diff) | |
download | libgit2-3a7ffc29c9416c5d182835c7f18c04437366f218.tar.gz |
config: initial multivar iterator
Diffstat (limited to 'include/git2/sys')
-rw-r--r-- | include/git2/sys/config.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/git2/sys/config.h b/include/git2/sys/config.h index 45599dc69..477d47271 100644 --- a/include/git2/sys/config.h +++ b/include/git2/sys/config.h @@ -36,9 +36,10 @@ struct git_config_iterator { unsigned int flags; /** - * Return the current entry and advance the iterator + * Return the current entry and advance the iterator. The + * memory belongs to the library. */ - int (*next)(git_config_entry *entry, git_config_iterator *iter); + int (*next)(const git_config_entry *entry, git_config_iterator *iter); /** * Free the iterator @@ -58,6 +59,7 @@ struct git_config_backend { int (*open)(struct git_config_backend *, git_config_level_t level); int (*get)(const struct git_config_backend *, const char *key, const git_config_entry **entry); int (*get_multivar_foreach)(struct git_config_backend *, const char *key, const char *regexp, git_config_foreach_cb callback, void *payload); + int (*get_multivar)(git_config_iterator **, struct git_config_backend *, const char *name, const char *regexp); 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); |