summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-01-18 17:38:36 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 15:12:56 -0600
commit3351506aa8ef2b14d28fca5fb4edd55b2f15ad1b (patch)
treea980abc8785b286b4049335c60bcc567c73d2274 /include
parent2e8c3b0b18896ac8aeaed758da51f3ea9c133fe8 (diff)
downloadlibgit2-3351506aa8ef2b14d28fca5fb4edd55b2f15ad1b.tar.gz
tree functions: return an int
Stop returning a void for functions, future-proofing them to allow them to fail.
Diffstat (limited to 'include')
-rw-r--r--include/git2/tree.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 4455d2e73..1a8e155fc 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -258,8 +258,9 @@ GIT_EXTERN(int) git_treebuilder_new(
* Clear all the entires in the builder
*
* @param bld Builder to clear
+ * @return 0 on success; error code otherwise
*/
-GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
+GIT_EXTERN(int) git_treebuilder_clear(git_treebuilder *bld);
/**
* Get the number of entries listed in a treebuilder
@@ -357,8 +358,9 @@ typedef int GIT_CALLBACK(git_treebuilder_filter_cb)(
* @param bld Tree builder
* @param filter Callback to filter entries
* @param payload Extra data to pass to filter callback
+ * @return 0 on success, non-zero callback return value, or error code
*/
-GIT_EXTERN(void) git_treebuilder_filter(
+GIT_EXTERN(int) git_treebuilder_filter(
git_treebuilder *bld,
git_treebuilder_filter_cb filter,
void *payload);