summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-07-31 01:20:21 +0100
committerGitHub <noreply@github.com>2017-07-31 01:20:21 +0100
commita9d6b9d529daa920b558ee3f34151422d10bc95e (patch)
treecf3ad3bc3766892b4f47e7100aef1096eeebdbf8
parentdca8c44f4f882098a9653a42d37194d7e3782119 (diff)
parent9093ced6a10a050c6eee31a4ef3b9251f58ce561 (diff)
downloadlibgit2-a9d6b9d529daa920b558ee3f34151422d10bc95e.tar.gz
Merge pull request #4304 from pks-t/pks/patch-buffers
patch_generate: represent buffers as void pointers
-rw-r--r--include/git2/patch.h4
-rw-r--r--src/patch_generate.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/git2/patch.h b/include/git2/patch.h
index 4eb9f0263..b177798e6 100644
--- a/include/git2/patch.h
+++ b/include/git2/patch.h
@@ -96,7 +96,7 @@ GIT_EXTERN(int) git_patch_from_blob_and_buffer(
git_patch **out,
const git_blob *old_blob,
const char *old_as_path,
- const char *buffer,
+ const void *buffer,
size_t buffer_len,
const char *buffer_as_path,
const git_diff_options *opts);
@@ -124,7 +124,7 @@ GIT_EXTERN(int) git_patch_from_buffers(
const void *old_buffer,
size_t old_len,
const char *old_as_path,
- const char *new_buffer,
+ const void *new_buffer,
size_t new_len,
const char *new_as_path,
const git_diff_options *opts);
diff --git a/src/patch_generate.c b/src/patch_generate.c
index 804fc0e09..ee0ac150e 100644
--- a/src/patch_generate.c
+++ b/src/patch_generate.c
@@ -641,7 +641,7 @@ int git_patch_from_blob_and_buffer(
git_patch **out,
const git_blob *old_blob,
const char *old_path,
- const char *buf,
+ const void *buf,
size_t buflen,
const char *buf_path,
const git_diff_options *opts)
@@ -680,7 +680,7 @@ int git_patch_from_buffers(
const void *old_buf,
size_t old_len,
const char *old_path,
- const char *new_buf,
+ const void *new_buf,
size_t new_len,
const char *new_path,
const git_diff_options *opts)