diff options
author | Jacques Germishuys <jacquesg@striata.com> | 2014-04-03 15:50:21 +0200 |
---|---|---|
committer | Jacques Germishuys <jacquesg@striata.com> | 2014-04-03 16:06:31 +0200 |
commit | 3b4ba2787049c561cd7a9e3fea8fc16e473a0b32 (patch) | |
tree | 14f1ba819d09fce9872eb31db424b30274447d02 /include/git2/refs.h | |
parent | fd61f05ea605155ed9e56bfad0e804c6718e0611 (diff) | |
download | libgit2-3b4ba2787049c561cd7a9e3fea8fc16e473a0b32.tar.gz |
Const correctness!
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r-- | include/git2/refs.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index 1bbb4ca46..6a1db65a8 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -487,7 +487,9 @@ GIT_EXTERN(void) git_reference_free(git_reference *ref); * @param ref2 The second git_reference * @return 0 if the same, else a stable but meaningless ordering. */ -GIT_EXTERN(int) git_reference_cmp(git_reference *ref1, git_reference *ref2); +GIT_EXTERN(int) git_reference_cmp( + const git_reference *ref1, + const git_reference *ref2); /** * Create an iterator for the repo's references @@ -596,7 +598,7 @@ GIT_EXTERN(int) git_reference_is_branch(const git_reference *ref); * @return 1 when the reference lives in the refs/remotes * namespace; 0 otherwise. */ -GIT_EXTERN(int) git_reference_is_remote(git_reference *ref); +GIT_EXTERN(int) git_reference_is_remote(const git_reference *ref); /** * Check if a reference is a tag @@ -606,7 +608,7 @@ GIT_EXTERN(int) git_reference_is_remote(git_reference *ref); * @return 1 when the reference lives in the refs/tags * namespace; 0 otherwise. */ -GIT_EXTERN(int) git_reference_is_tag(git_reference *ref); +GIT_EXTERN(int) git_reference_is_tag(const git_reference *ref); /** * Check if a reference is a note @@ -616,7 +618,7 @@ GIT_EXTERN(int) git_reference_is_tag(git_reference *ref); * @return 1 when the reference lives in the refs/notes * namespace; 0 otherwise. */ -GIT_EXTERN(int) git_reference_is_note(git_reference *ref); +GIT_EXTERN(int) git_reference_is_note(const git_reference *ref); typedef enum { GIT_REF_FORMAT_NORMAL = 0u, @@ -720,7 +722,7 @@ GIT_EXTERN(int) git_reference_is_valid_name(const char *refname); * @param ref a reference * @return the human-readable version of the name */ -GIT_EXTERN(const char *) git_reference_shorthand(git_reference *ref); +GIT_EXTERN(const char *) git_reference_shorthand(const git_reference *ref); /** @} */ |