diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-02-27 04:28:31 +0100 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-02-27 05:30:07 +0100 |
| commit | 13224ea4aad9a1b3c9cc4c992ceaea9af623e047 (patch) | |
| tree | b5c3a503d1ef7ba6269bf4291530c4e8e5936bdb /tests-clar/core/buffer.c | |
| parent | e07c2d225deec42e592133df49ad8c564d4d66c7 (diff) | |
| download | libgit2-13224ea4aad9a1b3c9cc4c992ceaea9af623e047.tar.gz | |
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.
Diffstat (limited to 'tests-clar/core/buffer.c')
| -rw-r--r-- | tests-clar/core/buffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests-clar/core/buffer.c b/tests-clar/core/buffer.c index 740cd857..870525b3 100644 --- a/tests-clar/core/buffer.c +++ b/tests-clar/core/buffer.c @@ -218,8 +218,8 @@ check_buf_append( const char* data_a, const char* data_b, const char* expected_data, - ssize_t expected_size, - ssize_t expected_asize) + size_t expected_size, + size_t expected_asize) { git_buf tgt = GIT_BUF_INIT; @@ -371,8 +371,8 @@ void test_core_buffer__7(void) git_buf_attach(&a, b, 0); cl_assert_strequal(fun, a.ptr); - cl_assert(a.size == (ssize_t)strlen(fun)); - cl_assert(a.asize == (ssize_t)strlen(fun) + 1); + cl_assert(a.size == strlen(fun)); + cl_assert(a.asize == strlen(fun) + 1); git_buf_free(&a); @@ -380,8 +380,8 @@ void test_core_buffer__7(void) git_buf_attach(&a, b, strlen(fun) + 1); cl_assert_strequal(fun, a.ptr); - cl_assert(a.size == (ssize_t)strlen(fun)); - cl_assert(a.asize == (ssize_t)strlen(fun) + 1); + cl_assert(a.size == strlen(fun)); + cl_assert(a.asize == strlen(fun) + 1); git_buf_free(&a); } |
