diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-03-21 12:33:09 -0700 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-21 12:33:09 -0700 |
commit | a48ea31d69a76d6b398d3a1e522a1c7363a9b92a (patch) | |
tree | 1205730de9c5a02688a61360081c284c8ab6e535 /src/vector.h | |
parent | a4c291ef128e870d4e748dedfb3798c33df0ac15 (diff) | |
download | libgit2-a48ea31d69a76d6b398d3a1e522a1c7363a9b92a.tar.gz |
Reimplment git_status_foreach using git diff
This is an initial reimplementation of status using diff a la
the way that core git does it.
Diffstat (limited to 'src/vector.h')
-rw-r--r-- | src/vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vector.h b/src/vector.h index 180edbf7c..5bc27914a 100644 --- a/src/vector.h +++ b/src/vector.h @@ -44,6 +44,8 @@ GIT_INLINE(const void *) git_vector_get_const(const git_vector *v, unsigned int return (position < v->length) ? v->contents[position] : NULL; } +#define GIT_VECTOR_GET(V,I) ((I) < (V)->length ? (V)->contents[(I)] : NULL) + GIT_INLINE(void *) git_vector_last(git_vector *v) { return (v->length > 0) ? git_vector_get(v, v->length - 1) : NULL; |