diff options
author | Russell Belfer <rb@github.com> | 2013-09-10 16:33:32 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 09:31:44 -0700 |
commit | 2a7d224f99a053d93079644947d04e7cc085930f (patch) | |
tree | 5a9082e68e98cd85e0bde8d8e399d386158ad390 /src/buffer.h | |
parent | 974774c7b00c08585b05ff87174872be005a1f29 (diff) | |
download | libgit2-2a7d224f99a053d93079644947d04e7cc085930f.tar.gz |
Extend public filter api with filter lists
This moves the git_filter_list into the public API so that users
can create, apply, and dispose of filter lists. This allows more
granular application of filters to user data outside of libgit2
internals.
This also converts all the internal usage of filters to the public
APIs along with a few small tweaks to make it easier to use the
public git_buffer stuff alongside the internal git_buf.
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index b1cb5d06a..e07f29131 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -176,6 +176,11 @@ int git_buf_splice( size_t nb_to_insert); +GIT_INLINE(bool) git_buffer_is_allocated(const git_buffer *buffer) +{ + return (buffer->ptr != NULL && buffer->available > 0); +} + #define GIT_BUF_FROM_BUFFER(buffer) \ { (buffer)->ptr, (buffer)->available, (buffer)->size } |