@matheusbsbs / matheus-bagliano / commits / ac4c758adc
Fork 0

delta: stricter constness

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed May 5, 2006 at 02:35 UTC ac4c758adcf52b913b82d481626b0f8648e95475
3 files changed +6 -6
delta.h
+3 -3
@@ -2,11 +2,11 @@
2 #define DELTA_H
3
4 /* handling of delta buffers */
5 -extern void *diff_delta(void *from_buf, unsigned long from_size,
6 - void *to_buf, unsigned long to_size,
5 +extern void *diff_delta(const void *from_buf, unsigned long from_size,
6 + const void *to_buf, unsigned long to_size,
7 unsigned long *delta_size, unsigned long max_size);
8 extern void *patch_delta(void *src_buf, unsigned long src_size,
9 - void *delta_buf, unsigned long delta_size,
9 + const void *delta_buf, unsigned long delta_size,
10 unsigned long *dst_size);
11
12 /* the smallest possible delta size is 4 bytes */
diff-delta.c
+2 -2
@@ -131,8 +131,8 @@ static struct index ** delta_index(const unsigned char *buf,
131 /* the maximum size for any opcode */
132 #define MAX_OP_SIZE COPYOP_SIZE(0xffffffff, 0xffffffff)
133
134 -void *diff_delta(void *from_buf, unsigned long from_size,
135 - void *to_buf, unsigned long to_size,
134 +void *diff_delta(const void *from_buf, unsigned long from_size,
135 + const void *to_buf, unsigned long to_size,
136 unsigned long *delta_size,
137 unsigned long max_size)
138 {
patch-delta.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "delta.h"
15
16 void *patch_delta(void *src_buf, unsigned long src_size,
17 - void *delta_buf, unsigned long delta_size,
17 + const void *delta_buf, unsigned long delta_size,
18 unsigned long *dst_size)
19 {
20 const unsigned char *data, *top;