Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-01 02:14:45 +0400
committerRussell Belfer <rb@github.com>2013-03-01 02:14:45 +0400
commit97b7137459a64e24fbe5ef16bee254cae6b018a1 (patch)
tree74cd0a458616ebd069cf7e31bb454fccc37d2db4 /src/hashsig.c
parentf708c89fa6e0d156d7b083de53d311babd3d2d8c (diff)
Add GIT_STDLIB_CALL
This removes the one-off GIT_CDECL and adds a new standard way of doing this named GIT_STDLIB_CALL with a src/win32 specific def when on the Windows platform.
Diffstat (limited to 'src/hashsig.c')
-rw-r--r--src/hashsig.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/hashsig.c b/src/hashsig.c
index b6020e7f3..e9c5164a4 100644
--- a/src/hashsig.c
+++ b/src/hashsig.c
@@ -19,14 +19,7 @@ typedef uint64_t hashsig_state;
#define HASHSIG_HEAP_SIZE ((1 << 7) - 1)
-/* going to use qsort so jump through some Windows hoops */
-#ifdef GIT_WIN32
-#define GIT_CDECL __cdecl
-#else
-#define GIT_CDECL
-#endif
-
-typedef int (GIT_CDECL *hashsig_cmp)(const void *a, const void *b);
+typedef int (GIT_STDLIB_CALL *hashsig_cmp)(const void *a, const void *b);
typedef struct {
int size, asize;
@@ -60,13 +53,13 @@ static void hashsig_heap_init(hashsig_heap *h, hashsig_cmp cmp)
h->cmp = cmp;
}
-static int GIT_CDECL hashsig_cmp_max(const void *a, const void *b)
+static int GIT_STDLIB_CALL hashsig_cmp_max(const void *a, const void *b)
{
hashsig_t av = *(const hashsig_t *)a, bv = *(const hashsig_t *)b;
return (av < bv) ? -1 : (av > bv) ? 1 : 0;
}
-static int GIT_CDECL hashsig_cmp_min(const void *a, const void *b)
+static int GIT_STDLIB_CALL hashsig_cmp_min(const void *a, const void *b)
{
hashsig_t av = *(const hashsig_t *)a, bv = *(const hashsig_t *)b;
return (av > bv) ? -1 : (av < bv) ? 1 : 0;