diff: add const to shared pointers in the diff API.
This brings us into compliance with the libgit2 commit: commit bae957b95d59a840df72a725b06f00635471cfd8 Author: Russell Belfer <rb@github.com> Date: Tue Sep 25 16:31:46 2012 -0700 Add const to all shared pointers in diff API Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
@@ -42,8 +42,8 @@ extern PyTypeObject HunkType;
|
|||||||
|
|
||||||
static int diff_data_cb(
|
static int diff_data_cb(
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
git_diff_delta *delta,
|
const git_diff_delta *delta,
|
||||||
git_diff_range *range,
|
const git_diff_range *range,
|
||||||
char line_origin,
|
char line_origin,
|
||||||
const char *content,
|
const char *content,
|
||||||
size_t content_len)
|
size_t content_len)
|
||||||
@@ -75,8 +75,8 @@ static int diff_data_cb(
|
|||||||
|
|
||||||
static int diff_hunk_cb(
|
static int diff_hunk_cb(
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
git_diff_delta *delta,
|
const git_diff_delta *delta,
|
||||||
git_diff_range *range,
|
const git_diff_range *range,
|
||||||
const char *header,
|
const char *header,
|
||||||
size_t header_len)
|
size_t header_len)
|
||||||
{
|
{
|
||||||
@@ -158,7 +158,8 @@ static int diff_hunk_cb(
|
|||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int diff_file_cb(void *cb_data, git_diff_delta *delta, float progress)
|
static int diff_file_cb(void *cb_data, const git_diff_delta *delta,
|
||||||
|
float progress)
|
||||||
{
|
{
|
||||||
PyObject *files, *file;
|
PyObject *files, *file;
|
||||||
|
|
||||||
@@ -201,8 +202,8 @@ Diff_changes(Diff *self)
|
|||||||
|
|
||||||
static int diff_print_cb(
|
static int diff_print_cb(
|
||||||
void *cb_data,
|
void *cb_data,
|
||||||
git_diff_delta *delta,
|
const git_diff_delta *delta,
|
||||||
git_diff_range *range,
|
const git_diff_range *range,
|
||||||
char usage,
|
char usage,
|
||||||
const char *line,
|
const char *line,
|
||||||
size_t line_len)
|
size_t line_len)
|
||||||
|
Reference in New Issue
Block a user