diff --git a/include/git2/oid.h b/include/git2/oid.h index 384b656d7..1cfd4e5e2 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -167,10 +167,7 @@ GIT_EXTERN(int) git_oid_cmp(const git_oid *a, const git_oid *b); * @param b second oid structure. * @return true if equal, false otherwise */ -GIT_INLINE(int) git_oid_equal(const git_oid *a, const git_oid *b) -{ - return !git_oid_cmp(a, b); -} +GIT_EXTERN(int) git_oid_equal(const git_oid *a, const git_oid *b); /** * Compare the first 'len' hexadecimal characters (packets of 4 bits) diff --git a/src/oid.c b/src/oid.c index 567b6cf06..f74c43fe2 100644 --- a/src/oid.c +++ b/src/oid.c @@ -179,6 +179,11 @@ int git_oid_cmp(const git_oid *a, const git_oid *b) return git_oid__cmp(a, b); } +int git_oid_equal(const git_oid *a, const git_oid *b) +{ + return (git_oid__cmp(a, b) == 0); +} + int git_oid_ncmp(const git_oid *oid_a, const git_oid *oid_b, size_t len) { const unsigned char *a = oid_a->id;