@@ -328,7 +328,7 @@ typedef struct {
328328 * - returns 0, the delta is inserted into the diff, and the diff process
329329 * continues.
330330 */
331- typedef int ( * git_diff_notify_cb )(
331+ typedef int GIT_CALLBACK ( git_diff_notify_cb )(
332332 const git_diff * diff_so_far ,
333333 const git_diff_delta * delta_to_add ,
334334 const char * matched_pathspec ,
@@ -344,7 +344,7 @@ typedef int (*git_diff_notify_cb)(
344344 * @param new_path The path to the new file or NULL.
345345 * @return Non-zero to abort the diff.
346346 */
347- typedef int ( * git_diff_progress_cb )(
347+ typedef int GIT_CALLBACK ( git_diff_progress_cb )(
348348 const git_diff * diff_so_far ,
349349 const char * old_path ,
350350 const char * new_path ,
@@ -462,7 +462,7 @@ GIT_EXTERN(int) git_diff_init_options(
462462 * @param progress Goes from 0 to 1 over the diff
463463 * @param payload User-specified pointer from foreach function
464464 */
465- typedef int ( * git_diff_file_cb )(
465+ typedef int GIT_CALLBACK ( git_diff_file_cb )(
466466 const git_diff_delta * delta ,
467467 float progress ,
468468 void * payload );
@@ -528,7 +528,7 @@ typedef struct {
528528 * When iterating over a diff, callback that will be made for
529529 * binary content within the diff.
530530 */
531- typedef int ( * git_diff_binary_cb )(
531+ typedef int GIT_CALLBACK ( git_diff_binary_cb )(
532532 const git_diff_delta * delta ,
533533 const git_diff_binary * binary ,
534534 void * payload );
@@ -554,7 +554,7 @@ typedef struct {
554554/**
555555 * When iterating over a diff, callback that will be made per hunk.
556556 */
557- typedef int ( * git_diff_hunk_cb )(
557+ typedef int GIT_CALLBACK ( git_diff_hunk_cb )(
558558 const git_diff_delta * delta ,
559559 const git_diff_hunk * hunk ,
560560 void * payload );
@@ -615,7 +615,7 @@ typedef struct {
615615 * of text. This uses some extra GIT_DIFF_LINE_... constants for output
616616 * of lines of file and hunk headers.
617617 */
618- typedef int ( * git_diff_line_cb )(
618+ typedef int GIT_CALLBACK ( git_diff_line_cb )(
619619 const git_diff_delta * delta , /**< delta that contains this data */
620620 const git_diff_hunk * hunk , /**< hunk containing this data */
621621 const git_diff_line * line , /**< line data */
@@ -699,14 +699,14 @@ typedef enum {
699699 * Pluggable similarity metric
700700 */
701701typedef struct {
702- int ( * file_signature )(
702+ int GIT_CALLBACK ( file_signature )(
703703 void * * out , const git_diff_file * file ,
704704 const char * fullpath , void * payload );
705- int ( * buffer_signature )(
705+ int GIT_CALLBACK ( buffer_signature )(
706706 void * * out , const git_diff_file * file ,
707707 const char * buf , size_t buflen , void * payload );
708- void ( * free_signature )(void * sig , void * payload );
709- int ( * similarity )(int * score , void * siga , void * sigb , void * payload );
708+ void GIT_CALLBACK ( free_signature )(void * sig , void * payload );
709+ int GIT_CALLBACK ( similarity )(int * score , void * siga , void * sigb , void * payload );
710710 void * payload ;
711711} git_diff_similarity_metric ;
712712
0 commit comments