summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-05 09:35:58 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-05 09:50:11 (GMT)
commitac4c758adcf52b913b82d481626b0f8648e95475 (patch)
treedd5ea5058d21f9eae318bfdd19786df07e3e3468
parentfb335158d5a93349e16bc0985e75e93bb9fcd5eb (diff)
downloadgit-ac4c758adcf52b913b82d481626b0f8648e95475.zip
git-ac4c758adcf52b913b82d481626b0f8648e95475.tar.gz
git-ac4c758adcf52b913b82d481626b0f8648e95475.tar.bz2
delta: stricter constness
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--delta.h6
-rw-r--r--diff-delta.c4
-rw-r--r--patch-delta.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/delta.h b/delta.h
index 9464f3e..09b2e1e 100644
--- a/delta.h
+++ b/delta.h
@@ -2,11 +2,11 @@
#define DELTA_H
/* handling of delta buffers */
-extern void *diff_delta(void *from_buf, unsigned long from_size,
- void *to_buf, unsigned long to_size,
+extern void *diff_delta(const void *from_buf, unsigned long from_size,
+ const void *to_buf, unsigned long to_size,
unsigned long *delta_size, unsigned long max_size);
extern void *patch_delta(void *src_buf, unsigned long src_size,
- void *delta_buf, unsigned long delta_size,
+ const void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
/* the smallest possible delta size is 4 bytes */
diff --git a/diff-delta.c b/diff-delta.c
index 1188b31..5bc2204 100644
--- a/diff-delta.c
+++ b/diff-delta.c
@@ -131,8 +131,8 @@ static struct index ** delta_index(const unsigned char *buf,
/* the maximum size for any opcode */
#define MAX_OP_SIZE COPYOP_SIZE(0xffffffff, 0xffffffff)
-void *diff_delta(void *from_buf, unsigned long from_size,
- void *to_buf, unsigned long to_size,
+void *diff_delta(const void *from_buf, unsigned long from_size,
+ const void *to_buf, unsigned long to_size,
unsigned long *delta_size,
unsigned long max_size)
{
diff --git a/patch-delta.c b/patch-delta.c
index d95f0d9..affd4f6 100644
--- a/patch-delta.c
+++ b/patch-delta.c
@@ -14,7 +14,7 @@
#include "delta.h"
void *patch_delta(void *src_buf, unsigned long src_size,
- void *delta_buf, unsigned long delta_size,
+ const void *delta_buf, unsigned long delta_size,
unsigned long *dst_size)
{
const unsigned char *data, *top;