delta: stricter constness
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
fb335158d5
commit
ac4c758adc
6
delta.h
6
delta.h
@ -2,11 +2,11 @@
|
|||||||
#define DELTA_H
|
#define DELTA_H
|
||||||
|
|
||||||
/* handling of delta buffers */
|
/* handling of delta buffers */
|
||||||
extern void *diff_delta(void *from_buf, unsigned long from_size,
|
extern void *diff_delta(const void *from_buf, unsigned long from_size,
|
||||||
void *to_buf, unsigned long to_size,
|
const void *to_buf, unsigned long to_size,
|
||||||
unsigned long *delta_size, unsigned long max_size);
|
unsigned long *delta_size, unsigned long max_size);
|
||||||
extern void *patch_delta(void *src_buf, unsigned long src_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);
|
unsigned long *dst_size);
|
||||||
|
|
||||||
/* the smallest possible delta size is 4 bytes */
|
/* the smallest possible delta size is 4 bytes */
|
||||||
|
@ -131,8 +131,8 @@ static struct index ** delta_index(const unsigned char *buf,
|
|||||||
/* the maximum size for any opcode */
|
/* the maximum size for any opcode */
|
||||||
#define MAX_OP_SIZE COPYOP_SIZE(0xffffffff, 0xffffffff)
|
#define MAX_OP_SIZE COPYOP_SIZE(0xffffffff, 0xffffffff)
|
||||||
|
|
||||||
void *diff_delta(void *from_buf, unsigned long from_size,
|
void *diff_delta(const void *from_buf, unsigned long from_size,
|
||||||
void *to_buf, unsigned long to_size,
|
const void *to_buf, unsigned long to_size,
|
||||||
unsigned long *delta_size,
|
unsigned long *delta_size,
|
||||||
unsigned long max_size)
|
unsigned long max_size)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "delta.h"
|
#include "delta.h"
|
||||||
|
|
||||||
void *patch_delta(void *src_buf, unsigned long src_size,
|
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)
|
unsigned long *dst_size)
|
||||||
{
|
{
|
||||||
const unsigned char *data, *top;
|
const unsigned char *data, *top;
|
||||||
|
Loading…
Reference in New Issue
Block a user