diff options
author | Russell Belfer <rb@github.com> | 2013-09-12 14:48:24 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 09:31:45 -0700 |
commit | b47349b8dc742943e063cb3d755b9db66203e3d9 (patch) | |
tree | 8c424b2c07cc7b8cd63e6ef5153ee368036f8446 /include/git2/buffer.h | |
parent | 0e32635fcf9a874fe66f871e88c0bbc0511544f1 (diff) | |
download | libgit2-b47349b8dc742943e063cb3d755b9db66203e3d9.tar.gz |
Port tests from PR 1683
This ports over some of the tests from
https://github.com/libgit2/libgit2/pull/1683
by @yorah and @ethomson
Diffstat (limited to 'include/git2/buffer.h')
-rw-r--r-- | include/git2/buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/git2/buffer.h b/include/git2/buffer.h index ae8681f13..36a61e6c9 100644 --- a/include/git2/buffer.h +++ b/include/git2/buffer.h @@ -55,6 +55,11 @@ typedef struct { } git_buf; /** + * Static initializer for git_buf from static buffer + */ +#define GIT_BUF_INIT_CONST(STR,LEN) { (char *)(STR), 0, (size_t)(LEN) } + +/** * Free the memory referred to by the git_buf. * * Note that this does not free the `git_buf` itself, just the memory |