From 0534641dfec001794ae9a83cfd1cfc7acaef97b7 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Wed, 22 Feb 2012 15:15:35 -0800 Subject: Fix iterators based on pull request feedback This update addresses all of the feedback in pull request #570. The biggest change was to create actual linked list stacks for storing the tree and workdir iterator state. This cleaned up the code a ton. Additionally, all of the static functions had their 'git_' prefix removed, and a lot of other unnecessary changes were removed from the original patch. --- src/vector.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/vector.h') diff --git a/src/vector.h b/src/vector.h index c11e801c..44635ae1 100644 --- a/src/vector.h +++ b/src/vector.h @@ -22,7 +22,6 @@ typedef struct git_vector { #define GIT_VECTOR_INIT {0} int git_vector_init(git_vector *v, unsigned int initial_size, git_vector_cmp cmp); -int git_vector_alloc(git_vector **v, unsigned int initial_size, git_vector_cmp cmp); void git_vector_free(git_vector *v); void git_vector_clear(git_vector *v); @@ -54,7 +53,7 @@ int git_vector_insert(git_vector *v, void *element); int git_vector_insert_sorted(git_vector *v, void *element, int (*on_dup)(void **old, void *new)); int git_vector_remove(git_vector *v, unsigned int idx); -int git_vector_pop(git_vector *v, void **element); +void git_vector_pop(git_vector *v); void git_vector_uniq(git_vector *v); #endif -- cgit v1.2.1