From bae957b95d59a840df72a725b06f00635471cfd8 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 25 Sep 2012 16:31:46 -0700 Subject: 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! --- tests-clar/diff/diff_helpers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests-clar/diff/diff_helpers.c') diff --git a/tests-clar/diff/diff_helpers.c b/tests-clar/diff/diff_helpers.c index 0c4721897..b4c68769e 100644 --- a/tests-clar/diff/diff_helpers.c +++ b/tests-clar/diff/diff_helpers.c @@ -23,7 +23,7 @@ git_tree *resolve_commit_oid_to_tree( int diff_file_fn( void *cb_data, - git_diff_delta *delta, + const git_diff_delta *delta, float progress) { diff_expects *e = cb_data; @@ -48,8 +48,8 @@ int diff_file_fn( int diff_hunk_fn( void *cb_data, - git_diff_delta *delta, - git_diff_range *range, + const git_diff_delta *delta, + const git_diff_range *range, const char *header, size_t header_len) { @@ -67,8 +67,8 @@ int diff_hunk_fn( int diff_line_fn( void *cb_data, - git_diff_delta *delta, - git_diff_range *range, + const git_diff_delta *delta, + const git_diff_range *range, char line_origin, const char *content, size_t content_len) @@ -116,7 +116,7 @@ int diff_foreach_via_iterator( 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)); @@ -142,7 +142,7 @@ int diff_foreach_via_iterator( 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 *hdr; size_t hdr_len, l, num_l; -- cgit v1.2.1