From 86d7e1ca6f54161a9e4d1ebe7a2f8e4802dc9639 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 28 Feb 2011 12:46:13 +0200 Subject: Fix searching in git_vector We now store only one sorting callback that does entry comparison. This is used when sorting the entries using a quicksort, and when looking for a specific entry with the new search methods. The following search methods now exist: git_vector_search(vector, entry) git_vector_search2(vector, custom_search_callback, key) git_vector_bsearch(vector, entry) git_vector_bsearch2(vector, custom_search_callback, key) The sorting state of the vector is now stored internally. Signed-off-by: Vicent Marti --- src/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/commit.c') diff --git a/src/commit.c b/src/commit.c index 44e1e94e2..3eebb927a 100644 --- a/src/commit.c +++ b/src/commit.c @@ -112,7 +112,7 @@ int commit_parse_buffer(git_commit *commit, void *data, size_t len, unsigned int /* first parse; the vector hasn't been initialized yet */ if (commit->parents.contents == NULL) { - git_vector_init(&commit->parents, 4, NULL, NULL); + git_vector_init(&commit->parents, 4, NULL); } clear_parents(commit); -- cgit v1.2.1