diff options
| author | Shawn O. Pearce <spearce@spearce.org> | 2008-11-03 17:31:16 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2008-11-03 18:43:04 -0800 |
| commit | b7c891c629d298f2d82310d8ced2ee2e48084213 (patch) | |
| tree | 8d762aafd2108c0f4fee8133dd2213e3658c66af /src/oid.c | |
| parent | 367ab010d69ec4fff533c770eba5b1882f79cb41 (diff) | |
| download | libgit2-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.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -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)); -} |
