From 370ce56910b9e506b22c7b673ef630a046b90126 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 14 Aug 2010 20:35:10 +0200 Subject: [PATCH] Fix: do not export custom types in the extern API Some compilers give linking problems when exporting 'uint32_t' as a return type in the external API. Use generic types instead. Signed-off-by: Vicent Marti --- src/git/tree.h | 2 +- src/tree.c | 2 +- src/tree.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git/tree.h b/src/git/tree.h index bd589ea11..fcc38d5e0 100644 --- a/src/git/tree.h +++ b/src/git/tree.h @@ -68,7 +68,7 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(git_tree *tree, int id * @param entry a tree entry * @return attributes as an integer */ -GIT_EXTERN(uint32_t) git_tree_entry_attributes(const git_tree_entry *entry); +GIT_EXTERN(unsigned int) git_tree_entry_attributes(const git_tree_entry *entry); /** * Get the filename of a tree entry diff --git a/src/tree.c b/src/tree.c index 950b6bf1a..6760654f6 100644 --- a/src/tree.c +++ b/src/tree.c @@ -50,7 +50,7 @@ git_tree *git_tree_lookup(git_repository *repo, const git_oid *id) return (git_tree *)git_repository_lookup(repo, id, GIT_OBJ_TREE); } -uint32_t git_tree_entry_attributes(const git_tree_entry *entry) +unsigned int git_tree_entry_attributes(const git_tree_entry *entry) { return entry->attr; } diff --git a/src/tree.h b/src/tree.h index 2222b0349..4c0be2ae0 100644 --- a/src/tree.h +++ b/src/tree.h @@ -5,7 +5,7 @@ #include "repository.h" struct git_tree_entry { - uint32_t attr; + unsigned int attr; char *filename; git_oid oid;