diff options
Diffstat (limited to 'include/git2/common.h')
| -rw-r--r-- | include/git2/common.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h index 82f6ba48b..8d3d3c111 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -43,11 +43,18 @@ typedef size_t size_t; __attribute__((visibility("default"))) \ type #elif defined(_MSC_VER) -# define GIT_EXTERN(type) __declspec(dllexport) type +# define GIT_EXTERN(type) __declspec(dllexport) type __cdecl #else # define GIT_EXTERN(type) extern type #endif +/** Declare a callback function for application use. */ +#if defined(_MSC_VER) +# define GIT_CALLBACK(name) (__cdecl *name) +#else +# define GIT_CALLBACK(name) (*name) +#endif + /** Declare a function as deprecated. */ #if defined(__GNUC__) # define GIT_DEPRECATED(func) \ |
