summaryrefslogtreecommitdiff
path: root/include/git2/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/buffer.h')
-rw-r--r--include/git2/buffer.h5
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