summaryrefslogtreecommitdiff
path: root/include/git2/tree.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-04-29 14:22:06 -0700
committerRussell Belfer <rb@github.com>2013-04-29 14:22:06 -0700
commitd77611022c4a43d5e67cf52ce2bc2b11ee5bcdc0 (patch)
treed59b9eb5648f5603db6e68c0cefd14ce7049e8e5 /include/git2/tree.h
parentb7f167da29effa125663b143d3daf79a6ad88d2e (diff)
downloadlibgit2-d77611022c4a43d5e67cf52ce2bc2b11ee5bcdc0.tar.gz
Standardize cast versions of git_object accessors
This removes the GIT_INLINE versions of the simple git_object accessors and standardizes them with a helper macro in src/object.h to build the function bodies.
Diffstat (limited to 'include/git2/tree.h')
-rw-r--r--include/git2/tree.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 73bfc86f4..6ad722048 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -29,11 +29,8 @@ GIT_BEGIN_DECL
* @param id Identity of the tree to locate.
* @return 0 or an error code
*/
-GIT_INLINE(int) git_tree_lookup(
- git_tree **out, git_repository *repo, const git_oid *id)
-{
- return git_object_lookup((git_object **)out, repo, id, GIT_OBJ_TREE);
-}
+GIT_EXTERN(int) git_tree_lookup(
+ git_tree **out, git_repository *repo, const git_oid *id);
/**
* Lookup a tree object from the repository,
@@ -47,15 +44,11 @@ GIT_INLINE(int) git_tree_lookup(
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_INLINE(int) git_tree_lookup_prefix(
+GIT_EXTERN(int) git_tree_lookup_prefix(
git_tree **out,
git_repository *repo,
const git_oid *id,
- size_t len)
-{
- return git_object_lookup_prefix(
- (git_object **)out, repo, id, len, GIT_OBJ_TREE);
-}
+ size_t len);
/**
* Close an open tree
@@ -67,10 +60,7 @@ GIT_INLINE(int) git_tree_lookup_prefix(
*
* @param tree The tree to close
*/
-GIT_INLINE(void) git_tree_free(git_tree *tree)
-{
- git_object_free((git_object *)tree);
-}
+GIT_EXTERN(void) git_tree_free(git_tree *tree);
/**
* Get the id of a tree.