8000 buffer: Expose git_buf_put() to bindings · libgit2/libgit2@a2012c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2012c4

Browse files
committed
buffer: Expose git_buf_put() to bindings
1 parent b703049 commit a2012c4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

include/git2/buffer.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ GIT_EXTERN(int) git_buf_is_binary(const git_buf *buf);
121121
*/
122122
GIT_EXTERN(int) git_buf_contains_nul(const git_buf *buf);
123123

124+
/**
125+
* Append to an existing buffer a copy of some raw data.
126+
*
127+
* @param buffer The buffer to append to
128+
* @param data The data to copy into the buffer
129+
* @param len The length of the data to copy into the buffer
130+
* @return 0 on success, -1 on allocation failure
131+
*/
132+
GIT_EXTERN(int) git_buf_put(git_buf *buf, const char *data, size_t len);
133+
124134
GIT_END_DECL
125135

126136
/** @} */

src/buffer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ GIT_INLINE(bool) git_buf_oom(const git_buf *buf)
8989
int git_buf_sets(git_buf *buf, const char *string);
9090
int git_buf_putc(git_buf *buf, char c);
9191
int git_buf_putcn(git_buf *buf, char c, size_t len);
92-
int git_buf_put(git_buf *buf, const char *data, size_t len);
9392
int git_buf_puts(git_buf *buf, const char *string);
9493
int git_buf_printf(git_buf *buf, const char *format, ...) GIT_FORMAT_PRINTF(2, 3);
9594
int git_buf_vprintf(git_buf *buf, const char *format, va_list ap);

0 commit comments

Comments
 (0)
0