Commit 2375be48 by Edward Thomson

tree: return `size_t` for treebuilder entrycount

We keep the treebuilder entrycount as a `size_t` - return that instead
of downcasting to an `unsigned int`.  Callers who were storing this
value in an `unsigned int` will continue to downcast themselves, so
there should be no behavior change for callers.
parent ad6f2153
...@@ -267,7 +267,7 @@ GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld); ...@@ -267,7 +267,7 @@ GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
* @param bld a previously loaded treebuilder. * @param bld a previously loaded treebuilder.
* @return the number of entries in the treebuilder * @return the number of entries in the treebuilder
*/ */
GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld); GIT_EXTERN(size_t) git_treebuilder_entrycount(git_treebuilder *bld);
/** /**
* Free a tree builder * Free a tree builder
......
...@@ -340,7 +340,7 @@ size_t git_tree_entrycount(const git_tree *tree) ...@@ -340,7 +340,7 @@ size_t git_tree_entrycount(const git_tree *tree)
return tree->entries.size; return tree->entries.size;
} }
unsigned int git_treebuilder_entrycount(git_treebuilder *bld) size_t git_treebuilder_entrycount(git_treebuilder *bld)
{ {
assert(bld); assert(bld);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment