summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-09-05 02:33:02 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-09-09 13:12:11 +0200
commitb87600cb6b80678f1ef8ca994785a4ba733c2133 (patch)
treef76abab90003672b7207a6c256140a548bf28bfb /src/buffer.h
parentb0bda0a4ee248ab3b0ccd0fad2f62b8b66c5fc6c (diff)
downloadlibgit2-b87600cb6b80678f1ef8ca994785a4ba733c2133.tar.gz
buffer: add git_buf_clear
Set the size to zero so the memory that has already been allocated can be reused Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 1209340a1..02266f51e 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -18,6 +18,7 @@ void git_buf_puts(git_buf *buf, const char *string);
void git_buf_printf(git_buf *buf, const char *format, ...) GIT_FORMAT_PRINTF(2, 3);
const char *git_buf_cstr(git_buf *buf);
void git_buf_free(git_buf *buf);
+void git_buf_clear(git_buf *buf);
#define git_buf_PUTS(buf, str) git_buf_put(buf, str, sizeof(str) - 1)