summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-24 07:57:58 +0200
committernulltoken <emeric.fermas@gmail.com>2012-07-24 16:10:12 +0200
commitb8457baae24269c9fb777591e2a0e1b425ba31b6 (patch)
tree777a98dbd74f4906ac2faf0042e5118578196db7 /include/git2
parent944d250f964698b33d9fa09e2e6af74b1dd84de2 (diff)
downloadlibgit2-b8457baae24269c9fb777591e2a0e1b425ba31b6.tar.gz
portability: Improve x86/amd64 compatibility
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/blob.h2
-rw-r--r--include/git2/commit.h2
-rw-r--r--include/git2/index.h4
-rw-r--r--include/git2/object.h2
-rw-r--r--include/git2/odb.h2
-rw-r--r--include/git2/odb_backend.h2
-rw-r--r--include/git2/oid.h2
-rw-r--r--include/git2/reflog.h2
-rw-r--r--include/git2/tag.h2
-rw-r--r--include/git2/tree.h4
10 files changed, 12 insertions, 12 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h
index 544dc7c41..f0719f15d 100644
--- a/include/git2/blob.h
+++ b/include/git2/blob.h
@@ -46,7 +46,7 @@ GIT_INLINE(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_INLINE(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, const git_oid *id, unsigned int len)
+GIT_INLINE(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix((git_object **)blob, repo, id, len, GIT_OBJ_BLOB);
}
diff --git a/include/git2/commit.h b/include/git2/commit.h
index e8ecc808b..a159b79e1 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -48,7 +48,7 @@ GIT_INLINE(int) git_commit_lookup(git_commit **commit, git_repository *repo, con
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_INLINE(int) git_commit_lookup_prefix(git_commit **commit, git_repository *repo, const git_oid *id, unsigned len)
+GIT_INLINE(int) git_commit_lookup_prefix(git_commit **commit, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix((git_object **)commit, repo, id, len, GIT_OBJ_COMMIT);
}
diff --git a/include/git2/index.h b/include/git2/index.h
index f863a6065..0093330e2 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -279,7 +279,7 @@ GIT_EXTERN(int) git_index_remove(git_index *index, int position);
* @param n the position of the entry
* @return a pointer to the entry; NULL if out of bounds
*/
-GIT_EXTERN(git_index_entry *) git_index_get(git_index *index, unsigned int n);
+GIT_EXTERN(git_index_entry *) git_index_get(git_index *index, size_t n);
/**
* Get the count of entries currently in the index
@@ -319,7 +319,7 @@ GIT_EXTERN(const git_index_entry_unmerged *) git_index_get_unmerged_bypath(git_i
* @param n the position of the entry
* @return a pointer to the unmerged entry; NULL if out of bounds
*/
-GIT_EXTERN(const git_index_entry_unmerged *) git_index_get_unmerged_byindex(git_index *index, unsigned int n);
+GIT_EXTERN(const git_index_entry_unmerged *) git_index_get_unmerged_byindex(git_index *index, size_t n);
/**
* Return the stage number from a git index entry
diff --git a/include/git2/object.h b/include/git2/object.h
index d9e653fd4..722434dec 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -75,7 +75,7 @@ GIT_EXTERN(int) git_object_lookup_prefix(
git_object **object_out,
git_repository *repo,
const git_oid *id,
- unsigned int len,
+ size_t len,
git_otype type);
/**
diff --git a/include/git2/odb.h b/include/git2/odb.h
index dac9e06a9..73f34177c 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -139,7 +139,7 @@ GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *i
* GIT_ENOTFOUND if the object is not in the database.
* GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)
*/
-GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git_oid *short_id, unsigned int len);
+GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git_oid *short_id, size_t len);
/**
* Read the header of an object from the database, without
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 3f67202d1..74977f32d 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -42,7 +42,7 @@ struct git_odb_backend {
void **, size_t *, git_otype *,
struct git_odb_backend *,
const git_oid *,
- unsigned int);
+ size_t);
int (* read_header)(
size_t *, git_otype *,
diff --git a/include/git2/oid.h b/include/git2/oid.h
index a05b40a37..4d0796480 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -147,7 +147,7 @@ GIT_EXTERN(int) git_oid_cmp(const git_oid *a, const git_oid *b);
* @param len the number of hex chars to compare
* @return 0 in case of a match
*/
-GIT_EXTERN(int) git_oid_ncmp(const git_oid *a, const git_oid *b, unsigned int len);
+GIT_EXTERN(int) git_oid_ncmp(const git_oid *a, const git_oid *b, size_t len);
/**
* Check if an oid equals an hex formatted object id.
diff --git a/include/git2/reflog.h b/include/git2/reflog.h
index 8acba349b..175ea79ca 100644
--- a/include/git2/reflog.h
+++ b/include/git2/reflog.h
@@ -84,7 +84,7 @@ GIT_EXTERN(unsigned int) git_reflog_entrycount(git_reflog *reflog);
* @param idx the position to lookup
* @return the entry; NULL if not found
*/
-GIT_EXTERN(const git_reflog_entry *) git_reflog_entry_byindex(git_reflog *reflog, unsigned int idx);
+GIT_EXTERN(const git_reflog_entry *) git_reflog_entry_byindex(git_reflog *reflog, size_t idx);
/**
* Get the old oid
diff --git a/include/git2/tag.h b/include/git2/tag.h
index b522451a1..aab4b77a8 100644
--- a/include/git2/tag.h
+++ b/include/git2/tag.h
@@ -46,7 +46,7 @@ GIT_INLINE(int) git_tag_lookup(git_tag **tag, git_repository *repo, const git_oi
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_INLINE(int) git_tag_lookup_prefix(git_tag **tag, git_repository *repo, const git_oid *id, unsigned int len)
+GIT_INLINE(int) git_tag_lookup_prefix(git_tag **tag, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix((git_object **)tag, repo, id, len, (git_otype)GIT_OBJ_TAG);
}
diff --git a/include/git2/tree.h b/include/git2/tree.h
index f12b15e2e..014097b12 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -50,7 +50,7 @@ GIT_INLINE(int) git_tree_lookup_prefix(
git_tree **tree,
git_repository *repo,
const git_oid *id,
- unsigned int len)
+ size_t len)
{
return git_object_lookup_prefix((git_object **)tree, repo, id, len, GIT_OBJ_TREE);
}
@@ -126,7 +126,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, unsigned int idx);
+GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(git_tree *tree, size_t idx);
/**
* Get the UNIX file attributes of a tree entry