diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-12-14 06:27:53 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-12-14 06:27:53 +0400 |
commit | bf6d2717ab3b1a23ac7bd7f400518bbd6845c2f1 (patch) | |
tree | 8004bbebff4d0d76a347eb868981bc5f8eea079d /src/buffer.h | |
parent | 7af26f8f5816ba602a30bbc1c8eb8eced1247bd6 (diff) |
buffer: inline `git_buf_cstr`
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/buffer.h b/src/buffer.h index 30658f3c2..52fd9a678 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -92,12 +92,17 @@ int git_buf_join(git_buf *buf, char separator, const char *str_a, const char *st * Join two strings as paths, inserting a slash between as needed. * @return error code or GIT_SUCCESS */ -GIT_INLINE (int) git_buf_joinpath(git_buf *buf, const char *a, const char *b) +GIT_INLINE(int) git_buf_joinpath(git_buf *buf, const char *a, const char *b) { return git_buf_join(buf, '/', a, b); } -const char *git_buf_cstr(git_buf *buf); +GIT_INLINE(const char *) git_buf_cstr(git_buf *buf) +{ + return buf->ptr; +} + + void git_buf_copy_cstr(char *data, size_t datasize, const git_buf *buf); #define git_buf_PUTS(buf, str) git_buf_put(buf, str, sizeof(str) - 1) |