From 22d2062d954dcb88fa3dc65281d3f3d88ae87d68 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Wed, 9 Jan 2019 18:25:10 +0000 Subject: 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. --- include/git2/sys/commit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/git2/sys/commit.h') diff --git a/include/git2/sys/commit.h b/include/git2/sys/commit.h index 627d3ae2e..ba671061f 100644 --- a/include/git2/sys/commit.h +++ b/include/git2/sys/commit.h @@ -50,7 +50,7 @@ GIT_EXTERN(int) git_commit_create_from_ids( * along with the user supplied payload. This should return a git_oid of * the next parent or NULL if all parents have been provided. */ -typedef const git_oid *(*git_commit_parent_callback)(size_t idx, void *payload); +typedef const git_oid * GIT_CALLBACK(git_commit_parent_callback)(size_t idx, void *payload); /** * Create a new commit in the repository with an callback to supply parents. -- cgit v1.2.1