mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
buffer: inline git_buf_cstr
This commit is contained in:
parent
7af26f8f58
commit
bf6d2717ab
@ -175,11 +175,6 @@ int git_buf_printf(git_buf *buf, const char *format, ...)
|
||||
return GIT_SUCCESS;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
size_t copylen;
|
||||
|
@ -97,7 +97,12 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user