diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2013-03-06 19:07:56 +0100 |
---|---|---|
committer | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2013-03-06 19:07:56 +0100 |
commit | 1a90dcf64e561b21e0981a7d87d71e349fa37f69 (patch) | |
tree | 24526328de5b985b98bc36e4d54c55bd2579ebf5 /src/notes.c | |
parent | 6edb427b7615207142e10a228164d6a019045126 (diff) | |
download | libgit2-1a90dcf64e561b21e0981a7d87d71e349fa37f69.tar.gz |
use git_note_iterator type instead of non-public git_iterator one
Diffstat (limited to 'src/notes.c')
-rw-r--r-- | src/notes.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/notes.c b/src/notes.c index d7462d017..987c5a6a3 100644 --- a/src/notes.c +++ b/src/notes.c @@ -584,7 +584,7 @@ int git_note_foreach( void *payload) { int error; - git_iterator *iter = NULL; + git_note_iterator *iter = NULL; git_tree *tree = NULL; git_commit *commit = NULL; git_oid annotated_object_id; @@ -612,8 +612,17 @@ int git_note_foreach( return error; } +void git_note_iterator_free(git_note_iterator *it) +{ + if (it == NULL) + return; + + git_iterator_free(it); +} + + int git_note_iterator_new( - git_iterator **it, + git_note_iterator **it, git_repository *repo, const char *notes_ref ) @@ -624,7 +633,7 @@ int git_note_iterator_new( error = retrieve_note_tree_and_commit(&tree, &commit, repo, ¬es_ref); if (!error) { - *it = (git_iterator *)git__malloc(sizeof(git_iterator)); + *it = (git_note_iterator *)git__malloc(sizeof(git_iterator)); GITERR_CHECK_ALLOC(*it); error = git_iterator_for_tree(it, tree); @@ -641,7 +650,7 @@ int git_note_iterator_new( int git_note_next( git_oid* note_id, git_oid* annotated_id, - git_iterator *it + git_note_iterator *it ) { int error; |