summaryrefslogtreecommitdiff
path: root/src/git2/blob.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-01-03 22:34:27 +0200
committerVicent Marti <tanoku@gmail.com>2011-01-03 22:34:27 +0200
commite52ed7a5595568f169b3df74b675059c3d04da4a (patch)
tree343dd106eeb770a4e3e68759c681a096469ba70a /src/git2/blob.h
parentfb3cd6bca40ef942898e9d5ae5d9f305deefcc40 (diff)
downloadlibgit2-e52ed7a5595568f169b3df74b675059c3d04da4a.tar.gz
Split object methods from repository.c
All the relevant git_object methods have been moved to object.c Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/blob.h')
-rw-r--r--src/git2/blob.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/git2/blob.h b/src/git2/blob.h
index 9c7b5a2a9..b34b5bfe9 100644
--- a/src/git2/blob.h
+++ b/src/git2/blob.h
@@ -28,6 +28,7 @@
#include "common.h"
#include "types.h"
#include "oid.h"
+#include "repository.h"
/**
* @file git2/blob.h
@@ -48,7 +49,10 @@ GIT_BEGIN_DECL
* @param id identity of the blob to locate.
* @return 0 on success; error code otherwise
*/
-GIT_EXTERN(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git_oid *id);
+GIT_INLINE(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git_oid *id)
+{
+ return git_repository_lookup((git_object **)blob, repo, id, GIT_OBJ_BLOB);
+}
/**
* Create a new in-memory git_blob.
@@ -61,7 +65,10 @@ GIT_EXTERN(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git
* @param repo The repository where the object will reside
* @return 0 on success; error code otherwise
*/
-GIT_EXTERN(int) git_blob_new(git_blob **blob, git_repository *repo);
+GIT_INLINE(int) git_blob_new(git_blob **blob, git_repository *repo)
+{
+ return git_repository_newobject((git_object **)blob, repo, GIT_OBJ_BLOB);
+}
/**
* Fill a blob with the contents inside