From b7f167da29effa125663b143d3daf79a6ad88d2e Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 29 Apr 2013 13:52:12 -0700 Subject: Make git_oid_cmp public and add git_oid__cmp --- include/git2/oid.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'include/git2/oid.h') 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 -- cgit v1.2.1