diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-09 18:25:10 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 21:17:32 +0000 |
| commit | 22d2062d954dcb88fa3dc65281d3f3d88ae87d68 (patch) | |
| tree | 22852e22d6c571be8ccc1cdaece3d926360fc191 /include/git2/sys/merge.h | |
| parent | 57b753a0dc0db2d89341300470653e8a4d066c0b (diff) | |
| download | libgit2-22d2062d954dcb88fa3dc65281d3f3d88ae87d68.tar.gz | |
Introduce GIT_CALLBACK macro to enforce cdecl
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.
The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
Diffstat (limited to 'include/git2/sys/merge.h')
| -rw-r--r-- | include/git2/sys/merge.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/git2/sys/merge.h b/include/git2/sys/merge.h index f07997d2e..bd0a8a4b7 100644 --- a/include/git2/sys/merge.h +++ b/include/git2/sys/merge.h @@ -73,7 +73,7 @@ GIT_EXTERN(const git_merge_file_options *) git_merge_driver_source_file_options( * initialization operations (in case libgit2 is being used in a way that * doesn't need the merge driver). */ -typedef int (*git_merge_driver_init_fn)(git_merge_driver *self); +typedef int GIT_CALLBACK(git_merge_driver_init_fn)(git_merge_driver *self); /** * Shutdown callback on merge driver @@ -85,7 +85,7 @@ typedef int (*git_merge_driver_init_fn)(git_merge_driver *self); * * Typically this function will free the `git_merge_driver` object itself. */ -typedef void (*git_merge_driver_shutdown_fn)(git_merge_driver *self); +typedef void GIT_CALLBACK(git_merge_driver_shutdown_fn)(git_merge_driver *self); /** * Callback to perform the merge. @@ -105,7 +105,7 @@ typedef void (*git_merge_driver_shutdown_fn)(git_merge_driver *self); * * The `src` contains the data about the file to be merged. */ -typedef int (*git_merge_driver_apply_fn)( +typedef int GIT_CALLBACK(git_merge_driver_apply_fn)( git_merge_driver *self, const char **path_out, uint32_t *mode_out, |
