summaryrefslogtreecommitdiff
path: root/src/oid.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-11-03 17:31:16 -0800
committerShawn O. Pearce <spearce@spearce.org>2008-11-03 18:43:04 -0800
commitb7c891c629d298f2d82310d8ced2ee2e48084213 (patch)
tree8d762aafd2108c0f4fee8133dd2213e3658c66af /src/oid.c
parent367ab010d69ec4fff533c770eba5b1882f79cb41 (diff)
downloadlibgit2-b7c891c629d298f2d82310d8ced2ee2e48084213.tar.gz
Add git_oid_cpy, git_oid_cmp as inline functions
These are easily built off the standard C library functions memcpy and memcmp. By marking these inline we stand a good chance of the C compiler replacing the entire thing with tight machine code, because many compilers will actually inline a memcmp or memcpy when the 3rd argument (the size) is a constant value. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/oid.c')
-rw-r--r--src/oid.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/oid.c b/src/oid.c
index 72b9511ad..e235f89f5 100644
--- a/src/oid.c
+++ b/src/oid.c
@@ -57,8 +57,3 @@ int git_oid_mkstr(git_oid *out, const char *str)
}
return GIT_SUCCESS;
}
-
-void git_oid_mkraw(git_oid *out, const unsigned char *raw)
-{
- memcpy(out->id, raw, sizeof(out->id));
-}