diff options
author | Russell Belfer <rb@github.com> | 2013-01-07 15:44:22 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-01-07 15:44:22 -0800 |
commit | f2b7f7a6cb8678763ada70e75d5b38407770e269 (patch) | |
tree | 0fca2a3ed081c1aa3e98679468f1ca273d1a3280 /src/blob.c | |
parent | f6234cd994ad01fb3aa8c2f0fd8e3d2cf89cf3f2 (diff) | |
download | libgit2-f2b7f7a6cb8678763ada70e75d5b38407770e269.tar.gz |
Share git_diff_blobs/git_diff_blob_to_buffer code
This moves the implementation of these two APIs into common code
that will be shared between the two. Also, this adds tests for
the `git_diff_blob_to_buffer` API. Lastly, this adds some extra
`const` to a few places that can use it.
Diffstat (limited to 'src/blob.c')
-rw-r--r-- | src/blob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blob.c b/src/blob.c index 811bd850f..c3519b921 100644 --- a/src/blob.c +++ b/src/blob.c @@ -13,13 +13,13 @@ #include "blob.h" #include "filter.h" -const void *git_blob_rawcontent(git_blob *blob) +const void *git_blob_rawcontent(const git_blob *blob) { assert(blob); return blob->odb_object->raw.data; } -git_off_t git_blob_rawsize(git_blob *blob) +git_off_t git_blob_rawsize(const git_blob *blob) { assert(blob); return (git_off_t)blob->odb_object->raw.len; |