From 3778db1be53e61ff285c573af5ee468803008456 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 17 Jul 2012 18:19:59 +0300 Subject: liblzma: Make the use of lzma_allocator const-correct. There is a tiny risk of causing breakage: If an application assigns lzma_stream.allocator to a non-const pointer, such code won't compile anymore. I don't know why anyone would do such a thing though, so in practice this shouldn't cause trouble. Thanks to Jan Kratochvil for the patch. --- src/liblzma/common/outqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liblzma/common/outqueue.c') diff --git a/src/liblzma/common/outqueue.c b/src/liblzma/common/outqueue.c index d7a87d9a..2dc8a38d 100644 --- a/src/liblzma/common/outqueue.c +++ b/src/liblzma/common/outqueue.c @@ -54,7 +54,7 @@ lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads) extern lzma_ret -lzma_outq_init(lzma_outq *outq, lzma_allocator *allocator, +lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator, uint64_t buf_size_max, uint32_t threads) { uint64_t bufs_alloc_size; @@ -98,7 +98,7 @@ lzma_outq_init(lzma_outq *outq, lzma_allocator *allocator, extern void -lzma_outq_end(lzma_outq *outq, lzma_allocator *allocator) +lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator) { lzma_free(outq->bufs, allocator); outq->bufs = NULL; -- cgit v1.2.3