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.
This commit is contained in:
Edward Thomson
2019-01-09 18:25:10 +00:00
parent 57b753a0dc
commit 22d2062d95
34 changed files with 162 additions and 155 deletions

View File

@@ -274,7 +274,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
* @param commit_id oid of Commit
* @param payload User-specified pointer to data to be passed as data payload
*/
typedef int(*git_revwalk_hide_cb)(
typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
const git_oid *commit_id,
void *payload);