summaryrefslogtreecommitdiff
path: root/src/revparse.c
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 /src/revparse.c
parent944d250f964698b33d9fa09e2e6af74b1dd84de2 (diff)
downloadlibgit2-b8457baae24269c9fb777591e2a0e1b425ba31b6.tar.gz
portability: Improve x86/amd64 compatibility
Diffstat (limited to 'src/revparse.c')
-rw-r--r--src/revparse.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/revparse.c b/src/revparse.c
index b0469286b..938938815 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -338,7 +338,7 @@ cleanup:
return error;
}
-static int handle_at_syntax(git_object **out, git_reference **ref, const char *spec, int identifier_len, git_repository* repo, const char *curly_braces_content)
+static int handle_at_syntax(git_object **out, git_reference **ref, const char *spec, size_t identifier_len, git_repository* repo, const char *curly_braces_content)
{
bool is_numeric;
int parsed = 0, error = -1;
@@ -547,7 +547,7 @@ static int handle_caret_curly_syntax(git_object **out, git_object *obj, const ch
return git_object_peel(out, obj, expected_type);
}
-static int extract_curly_braces_content(git_buf *buf, const char *spec, int *pos)
+static int extract_curly_braces_content(git_buf *buf, const char *spec, size_t *pos)
{
git_buf_clear(buf);
@@ -572,7 +572,7 @@ static int extract_curly_braces_content(git_buf *buf, const char *spec, int *pos
return 0;
}
-static int extract_path(git_buf *buf, const char *spec, int *pos)
+static int extract_path(git_buf *buf, const char *spec, size_t *pos)
{
git_buf_clear(buf);
@@ -588,7 +588,7 @@ static int extract_path(git_buf *buf, const char *spec, int *pos)
return 0;
}
-static int extract_how_many(int *n, const char *spec, int *pos)
+static int extract_how_many(int *n, const char *spec, size_t *pos)
{
const char *end_ptr;
int parsed, accumulated;
@@ -633,7 +633,7 @@ static int object_from_reference(git_object **object, git_reference *reference)
return error;
}
-static int ensure_base_rev_loaded(git_object **object, git_reference **reference, const char *spec, int identifier_len, git_repository *repo, bool allow_empty_identifier)
+static int ensure_base_rev_loaded(git_object **object, git_reference **reference, const char *spec, size_t identifier_len, git_repository *repo, bool allow_empty_identifier)
{
int error;
git_buf identifier = GIT_BUF_INIT;
@@ -670,7 +670,7 @@ static int ensure_base_rev_is_not_known_yet(git_object *object, const char *spec
return revspec_error(spec);
}
-static bool any_left_hand_identifier(git_object *object, git_reference *reference, int identifier_len)
+static bool any_left_hand_identifier(git_object *object, git_reference *reference, size_t identifier_len)
{
if (object != NULL)
return true;
@@ -694,7 +694,7 @@ static int ensure_left_hand_identifier_is_not_known_yet(git_object *object, git_
int git_revparse_single(git_object **out, git_repository *repo, const char *spec)
{
- int pos = 0, identifier_len = 0;
+ size_t pos = 0, identifier_len = 0;
int error = -1, n;
git_buf buf = GIT_BUF_INIT;