diff options
| author | krasimir <krasimir@chalmers.se> | 2017-04-12 10:24:56 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2017-04-12 10:24:56 +0000 |
| commit | a8eaa2f2e560547e63c7976960435e1ae23a22b1 (patch) | |
| tree | 06ce5fd0bc77a16113b5a53118843216fd3c1aea /src/runtime/c/gu/string.c | |
| parent | 915747efa793e53a7b7e9cfd861b4b4a46ace4a4 (diff) | |
a patch from Bjørnar Luteberget for compatibility with MSVC
Diffstat (limited to 'src/runtime/c/gu/string.c')
| -rw-r--r-- | src/runtime/c/gu/string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/c/gu/string.c b/src/runtime/c/gu/string.c index 5a31c8806..3e754a72c 100644 --- a/src/runtime/c/gu/string.c +++ b/src/runtime/c/gu/string.c @@ -5,7 +5,7 @@ #include <gu/utf8.h> #include <gu/assert.h> #include <stdlib.h> -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(_MSC_VER) #include <malloc.h> #endif @@ -273,7 +273,7 @@ gu_string_eq_fn(GuEquality* self, const void* p1, const void* p2) return strcmp((GuString) p1, (GuString) p2) == 0; } -GuEquality gu_string_equality[1] = { { gu_string_eq_fn } }; +GU_API_DATA GuEquality gu_string_equality[1] = { { gu_string_eq_fn } }; static int gu_string_cmp_fn(GuOrder* self, const void* p1, const void* p2) @@ -282,7 +282,7 @@ gu_string_cmp_fn(GuOrder* self, const void* p1, const void* p2) return strcmp((GuString) p1, (GuString) p2); } -GuOrder gu_string_order[1] = { { gu_string_cmp_fn } }; +GU_API_DATA GuOrder gu_string_order[1] = { { gu_string_cmp_fn } }; static GuHash gu_string_hasher_hash(GuHasher* self, const void* p) @@ -291,7 +291,7 @@ gu_string_hasher_hash(GuHasher* self, const void* p) return gu_string_hash(0, (GuString) p); } -GuHasher gu_string_hasher[1] = { +GU_API_DATA GuHasher gu_string_hasher[1] = { { .eq = { gu_string_eq_fn }, .hash = gu_string_hasher_hash |
