diff options
author | Russell Belfer <rb@github.com> | 2012-11-20 16:36:06 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-11-27 13:18:28 -0800 |
commit | 793c4385597d0786242e17c8ef37cdfa83f1865c (patch) | |
tree | 22e9b48db487577d865a174bc5b21a13a176c78f /examples/diff.c | |
parent | 54b2a37ac7715c74e5b06b76eb2b631987d7b6f8 (diff) | |
download | libgit2-793c4385597d0786242e17c8ef37cdfa83f1865c.tar.gz |
Update diff callback param order
This makes the diff functions that take callbacks both take
the payload parameter after the callback function pointers and
pass the payload as the last argument to the callback function
instead of the first. This should make them consistent with
other callbacks across the API.
Diffstat (limited to 'examples/diff.c')
-rw-r--r-- | examples/diff.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/diff.c b/examples/diff.c index c569b8664..a465182ba 100644 --- a/examples/diff.c +++ b/examples/diff.c @@ -63,12 +63,12 @@ char *colors[] = { }; static int printer( - void *data, const git_diff_delta *delta, const git_diff_range *range, char usage, const char *line, - size_t line_len) + size_t line_len, + void *data) { int *last_color = data, color = 0; @@ -225,9 +225,9 @@ int main(int argc, char *argv[]) fputs(colors[0], stdout); if (compact) - check(git_diff_print_compact(diff, &color, printer), "Displaying diff"); + check(git_diff_print_compact(diff, printer, &color), "Displaying diff"); else - check(git_diff_print_patch(diff, &color, printer), "Displaying diff"); + check(git_diff_print_patch(diff, printer, &color), "Displaying diff"); if (color >= 0) fputs(colors[0], stdout); |