diff options
author | Russell Belfer <rb@github.com> | 2013-04-29 13:52:12 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-04-29 13:52:12 -0700 |
commit | b7f167da29effa125663b143d3daf79a6ad88d2e (patch) | |
tree | 585355250e7078c7018a78c68539dc139912013b /include/git2/oid.h | |
parent | aa8f010120577e61715f3ae1286a03055815f9c3 (diff) | |
download | libgit2-b7f167da29effa125663b143d3daf79a6ad88d2e.tar.gz |
Make git_oid_cmp public and add git_oid__cmp
Diffstat (limited to 'include/git2/oid.h')
-rw-r--r-- | include/git2/oid.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h index 8d93e79cf..288e90bc8 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -154,19 +154,7 @@ GIT_EXTERN(int) git_oid_compare(const git_oid *oid_a, const git_oid *oid_b); * @param b second oid structure. * @return <0, 0, >0 if a < b, a == b, a > b. */ -GIT_INLINE(int) git_oid_cmp(const git_oid *a, const git_oid *b) -{ - const unsigned char *sha1 = a->id; - const unsigned char *sha2 = b->id; - int i; - - for (i = 0; i < GIT_OID_RAWSZ; i++, sha1++, sha2++) { - if (*sha1 != *sha2) - return *sha1 - *sha2; - } - - return 0; -} +GIT_EXTERN(int) git_oid_cmp(const git_oid *a, const git_oid *b); /** * Compare two oid structures for equality |