diff options
author | nulltoken <emeric.fermas@gmail.com> | 2015-02-10 09:38:57 +0100 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-02-10 10:57:29 +0100 |
commit | a2012c43899e6616366b47d7741b3f035e825e84 (patch) | |
tree | b5cf260f4082292deb9584a3e8761035d38ebcc4 /include/git2/buffer.h | |
parent | b703049c6189fec223896999b9cf5d78efcb08d7 (diff) | |
download | libgit2-ntk/expose_git_buf_put.tar.gz |
buffer: Expose git_buf_put() to bindingsntk/expose_git_buf_put
Diffstat (limited to 'include/git2/buffer.h')
-rw-r--r-- | include/git2/buffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/buffer.h b/include/git2/buffer.h index 9fc6a5805..5f96af6bf 100644 --- a/include/git2/buffer.h +++ b/include/git2/buffer.h @@ -121,6 +121,16 @@ GIT_EXTERN(int) git_buf_is_binary(const git_buf *buf); */ GIT_EXTERN(int) git_buf_contains_nul(const git_buf *buf); +/** +* Append to an existing buffer a copy of some raw data. +* +* @param buffer The buffer to append to +* @param data The data to copy into the buffer +* @param len The length of the data to copy into the buffer +* @return 0 on success, -1 on allocation failure +*/ +GIT_EXTERN(int) git_buf_put(git_buf *buf, const char *data, size_t len); + GIT_END_DECL /** @} */ |