]> git.proxmox.com Git - libgit2.git/commit - src/config_file.c
buffer: Unify `git_fbuffer` and `git_buf`
authorVicent Martí <tanoku@gmail.com>
Mon, 27 Feb 2012 03:28:31 +0000 (04:28 +0100)
committerVicent Martí <tanoku@gmail.com>
Mon, 27 Feb 2012 04:30:07 +0000 (05:30 +0100)
commit13224ea4aad9a1b3c9cc4c992ceaea9af623e047
treeb5c3a503d1ef7ba6269bf4291530c4e8e5936bdb
parente07c2d225deec42e592133df49ad8c564d4d66c7
buffer: Unify `git_fbuffer` and `git_buf`

This makes so much sense that I can't believe it hasn't been done
before. Kill the old `git_fbuffer` and read files straight into
`git_buf` objects.

Also: In order to fully support 4GB files in 32-bit systems, the
`git_buf` implementation has been changed from using `ssize_t` for
storage and storing negative values on allocation failure, to using
`size_t` and changing the buffer pointer to a magical pointer on
allocation failure.

Hopefully this won't break anything.
16 files changed:
src/attr_file.c
src/buffer.c
src/buffer.h
src/config_file.c
src/fileops.c
src/fileops.h
src/ignore.c
src/index.c
src/odb.c
src/odb_loose.c
src/reflog.c
src/refs.c
src/repository.c
tests-clar/core/buffer.c
tests-clar/core/path.c
tests/test_helpers.c