From f2b7f7a6cb8678763ada70e75d5b38407770e269 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Mon, 7 Jan 2013 15:44:22 -0800 Subject: 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. --- include/git2/blob.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/git2/blob.h') diff --git a/include/git2/blob.h b/include/git2/blob.h index 30055b614..93d1c7646 100644 --- a/include/git2/blob.h +++ b/include/git2/blob.h @@ -91,7 +91,7 @@ GIT_INLINE(const git_oid *) git_blob_id(const git_blob *blob) * @param blob pointer to the blob * @return the pointer; NULL if the blob has no contents */ -GIT_EXTERN(const void *) git_blob_rawcontent(git_blob *blob); +GIT_EXTERN(const void *) git_blob_rawcontent(const git_blob *blob); /** * Get the size in bytes of the contents of a blob @@ -99,7 +99,7 @@ GIT_EXTERN(const void *) git_blob_rawcontent(git_blob *blob); * @param blob pointer to the blob * @return size on bytes */ -GIT_EXTERN(git_off_t) git_blob_rawsize(git_blob *blob); +GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob); /** * Read a file from the working folder of a repository -- cgit v1.2.1