mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-01 00:16:00 +00:00
![]() Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c. |
||
---|---|---|
.. | ||
buffer.c | ||
dirent.c | ||
filebuf.c | ||
oid.c | ||
path.c | ||
rmdir.c | ||
string.c | ||
strtol.c | ||
vector.c |