summaryrefslogtreecommitdiffstats
path: root/liblzma/delta/delta_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'liblzma/delta/delta_decoder.c')
-rw-r--r--liblzma/delta/delta_decoder.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/liblzma/delta/delta_decoder.c b/liblzma/delta/delta_decoder.c
index 2cf60d5..6859afa 100644
--- a/liblzma/delta/delta_decoder.c
+++ b/liblzma/delta/delta_decoder.c
@@ -15,7 +15,7 @@
static void
-decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
+decode_buffer(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
{
const size_t distance = coder->distance;
@@ -27,11 +27,13 @@ decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
static lzma_ret
-delta_decode(lzma_coder *coder, lzma_allocator *allocator,
+delta_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action)
{
+ lzma_delta_coder *coder = coder_ptr;
+
assert(coder->next.code != NULL);
const size_t out_start = *out_pos;
@@ -47,7 +49,7 @@ delta_decode(lzma_coder *coder, lzma_allocator *allocator,
extern lzma_ret
-lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
+lzma_delta_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
const lzma_filter_info *filters)
{
next->code = &delta_decode;
@@ -56,7 +58,7 @@ lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
extern lzma_ret
-lzma_delta_props_decode(void **options, lzma_allocator *allocator,
+lzma_delta_props_decode(void **options, const lzma_allocator *allocator,
const uint8_t *props, size_t props_size)
{
if (props_size != 1)