diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-06-25 00:25:35 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-06-25 00:25:35 +0200 |
commit | 29d7242b1dcd1f09a63417abd648a6217b85d301 (patch) | |
tree | dedc3bc07a500770382ca4c517e4bb015e506c4b /include/git2/blob.h | |
parent | a50086d174658914d4d6462afbc83b02825b1f5b (diff) | |
parent | eddc1f1ed78898a4ca41480045b1d0d5b075e773 (diff) | |
download | libgit2-29d7242b1dcd1f09a63417abd648a6217b85d301.tar.gz |
Merge branch 'development'
Diffstat (limited to 'include/git2/blob.h')
-rw-r--r-- | include/git2/blob.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h index 0a2aa9d36..8fca48966 100644 --- a/include/git2/blob.h +++ b/include/git2/blob.h @@ -29,10 +29,7 @@ GIT_BEGIN_DECL * @param id identity of the blob to locate. * @return 0 or an error code */ -GIT_INLINE(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git_oid *id) -{ - return git_object_lookup((git_object **)blob, repo, id, GIT_OBJ_BLOB); -} +GIT_EXTERN(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git_oid *id); /** * Lookup a blob object from a repository, @@ -46,10 +43,7 @@ GIT_INLINE(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git * @param len the length of the short identifier * @return 0 or an error code */ -GIT_INLINE(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, const git_oid *id, size_t len) -{ - return git_object_lookup_prefix((git_object **)blob, repo, id, len, GIT_OBJ_BLOB); -} +GIT_EXTERN(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, const git_oid *id, size_t len); /** * Close an open blob @@ -62,11 +56,7 @@ GIT_INLINE(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, co * * @param blob the blob to close */ - -GIT_INLINE(void) git_blob_free(git_blob *blob) -{ - git_object_free((git_object *) blob); -} +GIT_EXTERN(void) git_blob_free(git_blob *blob); /** * Get the id of a blob. @@ -74,11 +64,15 @@ GIT_INLINE(void) git_blob_free(git_blob *blob) * @param blob a previously loaded blob. * @return SHA1 hash for this blob. */ -GIT_INLINE(const git_oid *) git_blob_id(const git_blob *blob) -{ - return git_object_id((const git_object *)blob); -} +GIT_EXTERN(const git_oid *) git_blob_id(const git_blob *blob); +/** + * Get the repository that contains the blob. + * + * @param blob A previously loaded blob. + * @return Repository that contains this blob. + */ +GIT_EXTERN(git_repository *) git_blob_owner(const git_blob *blob); /** * Get a read-only buffer with the raw content of a blob. |