aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lzma/lzma_encoder.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2016-11-21 20:24:50 +0200
committerLasse Collin <lasse.collin@tukaani.org>2016-11-21 20:24:50 +0200
commitd4a0462abe5478193521c14625e1c81fead87f9f (patch)
tree586031c1e9a515e105cfab17dc897d63b1395dd3 /src/liblzma/lzma/lzma_encoder.h
parentUpdate THANKS. (diff)
downloadxz-d4a0462abe5478193521c14625e1c81fead87f9f.tar.xz
liblzma: Avoid multiple definitions of lzma_coder structures.
Only one definition was visible in a translation unit. It avoided a few casts and temp variables but seems that this hack doesn't work with link-time optimizations in compilers as it's not C99/C11 compliant. Fixes: http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
Diffstat (limited to '')
-rw-r--r--src/liblzma/lzma/lzma_encoder.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/liblzma/lzma/lzma_encoder.h b/src/liblzma/lzma/lzma_encoder.h
index cc9cc2f2..6cfdf228 100644
--- a/src/liblzma/lzma/lzma_encoder.h
+++ b/src/liblzma/lzma/lzma_encoder.h
@@ -17,6 +17,9 @@
#include "common.h"
+typedef struct lzma_lzma1_encoder_s lzma_lzma1_encoder;
+
+
extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
const lzma_filter_info *filters);
@@ -36,16 +39,16 @@ extern bool lzma_lzma_lclppb_encode(
/// Initializes raw LZMA encoder; this is used by LZMA2.
extern lzma_ret lzma_lzma_encoder_create(
- lzma_coder **coder_ptr, const lzma_allocator *allocator,
+ void **coder_ptr, const lzma_allocator *allocator,
const lzma_options_lzma *options, lzma_lz_options *lz_options);
/// Resets an already initialized LZMA encoder; this is used by LZMA2.
extern lzma_ret lzma_lzma_encoder_reset(
- lzma_coder *coder, const lzma_options_lzma *options);
+ lzma_lzma1_encoder *coder, const lzma_options_lzma *options);
-extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
+extern lzma_ret lzma_lzma_encode(lzma_lzma1_encoder *restrict coder,
lzma_mf *restrict mf, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size,
uint32_t read_limit);