diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/array.h | 2 | ||||
-rw-r--r-- | src/bitvec.h | 2 | ||||
-rw-r--r-- | src/common.h | 7 | ||||
-rw-r--r-- | src/index.c | 4 | ||||
-rw-r--r-- | src/merge.c | 2 | ||||
-rw-r--r-- | src/vector.h | 2 |
6 files changed, 13 insertions, 6 deletions
diff --git a/src/array.h b/src/array.h index 1d4e1c224..f8a48722a 100644 --- a/src/array.h +++ b/src/array.h @@ -7,7 +7,7 @@ #ifndef INCLUDE_array_h__ #define INCLUDE_array_h__ -#include "util.h" +#include "common.h" /* * Use this to declare a typesafe resizable array of items, a la: diff --git a/src/bitvec.h b/src/bitvec.h index fd6f0ccf8..544832d95 100644 --- a/src/bitvec.h +++ b/src/bitvec.h @@ -7,7 +7,7 @@ #ifndef INCLUDE_bitvec_h__ #define INCLUDE_bitvec_h__ -#include "util.h" +#include "common.h" /* * This is a silly little fixed length bit vector type that will store diff --git a/src/common.h b/src/common.h index e315b5979..d389cf85d 100644 --- a/src/common.h +++ b/src/common.h @@ -10,6 +10,13 @@ #include "git2/common.h" #include "cc-compat.h" +/** Declare a function as always inlined. */ +#if defined(_MSC_VER) +# define GIT_INLINE(type) static __inline type +#else +# define GIT_INLINE(type) static inline type +#endif + #include <assert.h> #include <errno.h> #include <limits.h> diff --git a/src/index.c b/src/index.c index aa1aebf8a..e0c0022e1 100644 --- a/src/index.c +++ b/src/index.c @@ -438,7 +438,7 @@ static int create_index_error(int error, const char *msg) return error; } -int git_index_set_caps(git_index *index, unsigned int caps) +int git_index_set_caps(git_index *index, int caps) { unsigned int old_ignore_case; @@ -474,7 +474,7 @@ int git_index_set_caps(git_index *index, unsigned int caps) return 0; } -unsigned int git_index_caps(const git_index *index) +int git_index_caps(const git_index *index) { return ((index->ignore_case ? GIT_INDEXCAP_IGNORE_CASE : 0) | (index->distrust_filemode ? GIT_INDEXCAP_NO_FILEMODE : 0) | diff --git a/src/merge.c b/src/merge.c index 97c147920..12ff1c91c 100644 --- a/src/merge.c +++ b/src/merge.c @@ -2364,7 +2364,7 @@ done: int git_merge__indexes(git_repository *repo, git_index *index_new) { git_index *index_repo = NULL; - unsigned int index_repo_caps = 0; + int index_repo_caps = 0; git_vector paths = GIT_VECTOR_INIT; size_t index_conflicts = 0, wd_conflicts = 0, conflicts, i; char *path; diff --git a/src/vector.h b/src/vector.h index f8256853b..682b6ad27 100644 --- a/src/vector.h +++ b/src/vector.h @@ -7,7 +7,7 @@ #ifndef INCLUDE_vector_h__ #define INCLUDE_vector_h__ -#include "git2/common.h" +#include "common.h" typedef int (*git_vector_cmp)(const void *, const void *); |