From 9c45a9c80cd684f9b92a2a79756477861bb725e7 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 23 Nov 2009 22:20:34 -0500 Subject: [PATCH] foreach_ref: make ref argument const --- tig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tig.c b/tig.c index b20fb1b..bd30997 100644 --- a/tig.c +++ b/tig.c @@ -137,7 +137,7 @@ struct ref_list { }; static struct ref_list *get_ref_list(const char *id); -static void foreach_ref(bool (*visitor)(void *data, struct ref *ref), void *data); +static void foreach_ref(bool (*visitor)(void *data, const struct ref *ref), void *data); static int load_refs(void); enum format_flags { @@ -5036,7 +5036,7 @@ static struct view_ops blame_ops = { struct branch { const char *author; /* Author of the last commit. */ time_t time; /* Date of the last activity. */ - struct ref *ref; /* Name and commit ID information. */ + const struct ref *ref; /* Name and commit ID information. */ }; static const enum sort_field branch_sort_fields[] = { @@ -5144,7 +5144,7 @@ branch_read(struct view *view, char *line) } static bool -branch_open_visitor(void *data, struct ref *ref) +branch_open_visitor(void *data, const struct ref *ref) { struct view *view = data; struct branch *branch; @@ -7207,7 +7207,7 @@ compare_refs(const void *ref1_, const void *ref2_) } static void -foreach_ref(bool (*visitor)(void *data, struct ref *ref), void *data) +foreach_ref(bool (*visitor)(void *data, const struct ref *ref), void *data) { size_t i; -- 2.30.2