diff options
author | Russell Belfer <rb@github.com> | 2012-09-25 16:31:46 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-09-25 16:35:05 -0700 |
commit | bae957b95d59a840df72a725b06f00635471cfd8 (patch) | |
tree | 64eb7f9f52c9d27f4aa0ad00d2249af39e0ee2fc /tests-clar/diff/diffiter.c | |
parent | 642863086575a61b3ed0bbbe909f4f07d87ff9db (diff) | |
download | libgit2-bae957b95d59a840df72a725b06f00635471cfd8.tar.gz |
Add const to all shared pointers in diff API
There are a lot of places where the diff API gives the user access
to internal data structures and many of these were being exposed
through non-const pointers. This replaces them all with const
pointers for any object that the user can access but is still
owned internally to the git_diff_list or git_diff_patch objects.
This will probably break some bindings... Sorry!
Diffstat (limited to 'tests-clar/diff/diffiter.c')
-rw-r--r-- | tests-clar/diff/diffiter.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests-clar/diff/diffiter.c b/tests-clar/diff/diffiter.c index 4273b16dd..78f97fc86 100644 --- a/tests-clar/diff/diffiter.c +++ b/tests-clar/diff/diffiter.c @@ -20,7 +20,7 @@ void test_diff_diffiter__create(void) num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { - git_diff_delta *delta; + const git_diff_delta *delta; cl_git_pass(git_diff_get_patch(NULL, &delta, diff, d)); } @@ -40,7 +40,7 @@ void test_diff_diffiter__iterate_files(void) cl_assert_equal_i(6, num_d); for (d = 0; d < num_d; ++d) { - git_diff_delta *delta; + const git_diff_delta *delta; cl_git_pass(git_diff_get_patch(NULL, &delta, diff, d)); cl_assert(delta != NULL); count++; @@ -63,7 +63,7 @@ void test_diff_diffiter__iterate_files_2(void) cl_assert_equal_i(8, num_d); for (d = 0; d < num_d; ++d) { - git_diff_delta *delta; + const git_diff_delta *delta; cl_git_pass(git_diff_get_patch(NULL, &delta, diff, d)); cl_assert(delta != NULL); count++; @@ -91,7 +91,7 @@ void test_diff_diffiter__iterate_files_and_hunks(void) for (d = 0; d < num_d; ++d) { git_diff_patch *patch; - git_diff_delta *delta; + const git_diff_delta *delta; size_t h, num_h; cl_git_pass(git_diff_get_patch(&patch, &delta, diff, d)); @@ -104,7 +104,7 @@ void test_diff_diffiter__iterate_files_and_hunks(void) num_h = git_diff_patch_num_hunks(patch); for (h = 0; h < num_h; h++) { - git_diff_range *range; + const git_diff_range *range; const char *header; size_t header_len, num_l; @@ -143,7 +143,7 @@ void test_diff_diffiter__max_size_threshold(void) for (d = 0; d < num_d; ++d) { git_diff_patch *patch; - git_diff_delta *delta; + const git_diff_delta *delta; cl_git_pass(git_diff_get_patch(&patch, &delta, diff, d)); cl_assert(delta); @@ -178,7 +178,7 @@ void test_diff_diffiter__max_size_threshold(void) for (d = 0; d < num_d; ++d) { git_diff_patch *patch; - git_diff_delta *delta; + const git_diff_delta *delta; cl_git_pass(git_diff_get_patch(&patch, &delta, diff, d)); @@ -221,7 +221,7 @@ void test_diff_diffiter__iterate_all(void) num_d = git_diff_num_deltas(diff); for (d = 0; d < num_d; ++d) { git_diff_patch *patch; - git_diff_delta *delta; + const git_diff_delta *delta; size_t h, num_h; cl_git_pass(git_diff_get_patch(&patch, &delta, diff, d)); @@ -230,7 +230,7 @@ void test_diff_diffiter__iterate_all(void) num_h = git_diff_patch_num_hunks(patch); for (h = 0; h < num_h; h++) { - git_diff_range *range; + const git_diff_range *range; const char *header; size_t header_len, l, num_l; |