Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-12-07 03:04:31 +0400
committerRussell Belfer <rb@github.com>2013-12-11 22:57:49 +0400
commitfcd324c625d8be3f368c924d787e945e5812d8dd (patch)
treeac1e54b2538cdc10ee17dfd7c887c35dd1f572bf /src/vector.h
parentdab89f9b6821b67dd07c8bd4dbb53e25a3e687c7 (diff)
Add git_vector_free_all
There are a lot of places that we call git__free on each item in a vector and then call git_vector_free on the vector itself. This just wraps that up into one convenient helper function.
Diffstat (limited to 'src/vector.h')
-rw-r--r--src/vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vector.h b/src/vector.h
index 279f5c6ee..c6d3e9d55 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -23,6 +23,7 @@ typedef struct git_vector {
int git_vector_init(git_vector *v, size_t initial_size, git_vector_cmp cmp);
void git_vector_free(git_vector *v);
+void git_vector_free_all(git_vector *v); /* free each entry and self */
void git_vector_clear(git_vector *v);
int git_vector_dup(git_vector *v, const git_vector *src, git_vector_cmp cmp);
void git_vector_swap(git_vector *a, git_vector *b);