Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
e5c80097
Commit
e5c80097
authored
Jun 05, 2011
by
Romain Geissler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tree: API uniformasation: Use unsigned int for all index number.
parent
3a42e0a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
include/git2/tree.h
+2
-2
src/tree.c
+3
-3
No files found.
include/git2/tree.h
View file @
e5c80097
...
...
@@ -84,7 +84,7 @@ GIT_EXTERN(const git_oid *) git_tree_id(git_tree *tree);
* @param tree a previously loaded tree.
* @return the number of entries in the tree
*/
GIT_EXTERN
(
size_
t
)
git_tree_entrycount
(
git_tree
*
tree
);
GIT_EXTERN
(
unsigned
in
t
)
git_tree_entrycount
(
git_tree
*
tree
);
/**
* Lookup a tree entry by its filename
...
...
@@ -102,7 +102,7 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byname(git_tree *tree, const c
* @param idx the position in the entry list
* @return the tree entry; NULL if not found
*/
GIT_EXTERN
(
const
git_tree_entry
*
)
git_tree_entry_byindex
(
git_tree
*
tree
,
int
idx
);
GIT_EXTERN
(
const
git_tree_entry
*
)
git_tree_entry_byindex
(
git_tree
*
tree
,
unsigned
int
idx
);
/**
* Get the UNIX file attributes of a tree entry
...
...
src/tree.c
View file @
e5c80097
...
...
@@ -119,13 +119,13 @@ const git_tree_entry *git_tree_entry_byname(git_tree *tree, const char *filename
return
git_vector_get
(
&
tree
->
entries
,
idx
);
}
const
git_tree_entry
*
git_tree_entry_byindex
(
git_tree
*
tree
,
int
idx
)
const
git_tree_entry
*
git_tree_entry_byindex
(
git_tree
*
tree
,
unsigned
int
idx
)
{
assert
(
tree
);
return
git_vector_get
(
&
tree
->
entries
,
(
unsigned
int
)
idx
);
return
git_vector_get
(
&
tree
->
entries
,
idx
);
}
size_
t
git_tree_entrycount
(
git_tree
*
tree
)
unsigned
in
t
git_tree_entrycount
(
git_tree
*
tree
)
{
assert
(
tree
);
return
tree
->
entries
.
length
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment