1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Beta was supposed to be API stable but I had forgot to rename

lzma_memlimit_encoder and lzma_memlimit_decoder to
lzma_raw_encoder_memlimit and lzma_raw_decoder_memlimit. :-(
Now it is fixed. Hopefully it doesn't cause too much trouble
to those who already thought API is stable.
This commit is contained in:
Lasse Collin 2009-01-17 14:24:25 +02:00
parent b056379490
commit 128586213f
8 changed files with 14 additions and 14 deletions

View file

@ -102,7 +102,7 @@ extern lzma_bool lzma_filter_decoder_is_supported(lzma_vli id);
* \return Rough number of bytes required for the given filter chain
* when encoding.
*/
extern uint64_t lzma_memusage_encoder(const lzma_filter *filters)
extern uint64_t lzma_raw_encoder_memusage(const lzma_filter *filters)
lzma_attr_pure;
@ -115,7 +115,7 @@ extern uint64_t lzma_memusage_encoder(const lzma_filter *filters)
* \return Rough number of bytes required for the given filter chain
* when decoding.
*/
extern uint64_t lzma_memusage_decoder(const lzma_filter *filters)
extern uint64_t lzma_raw_decoder_memusage(const lzma_filter *filters)
lzma_attr_pure;

View file

@ -113,7 +113,7 @@ lzma_easy_encoder_memusage(uint32_t preset)
if (easy_set_filters(&coder, preset))
return UINT32_MAX;
return lzma_memusage_encoder(coder.filters);
return lzma_raw_encoder_memusage(coder.filters);
}
@ -124,5 +124,5 @@ lzma_easy_decoder_memusage(uint32_t preset)
if (easy_set_filters(&coder, preset))
return UINT32_MAX;
return lzma_memusage_decoder(coder.filters);
return lzma_raw_decoder_memusage(coder.filters);
}

View file

@ -223,7 +223,7 @@ lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
extern uint64_t
lzma_memusage_coder(lzma_filter_find coder_find,
lzma_raw_coder_memusage(lzma_filter_find coder_find,
const lzma_filter *filters)
{
// The chain has to have at least one filter.

View file

@ -48,7 +48,7 @@ extern lzma_ret lzma_raw_coder_init(
lzma_filter_find coder_find, bool is_encoder);
extern uint64_t lzma_memusage_coder(lzma_filter_find coder_find,
extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
const lzma_filter *filters);

View file

@ -180,9 +180,9 @@ lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
extern LZMA_API uint64_t
lzma_memusage_decoder(const lzma_filter *filters)
lzma_raw_decoder_memusage(const lzma_filter *filters)
{
return lzma_memusage_coder(
return lzma_raw_coder_memusage(
(lzma_filter_find)(&decoder_find), filters);
}

View file

@ -211,9 +211,9 @@ lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
extern LZMA_API uint64_t
lzma_memusage_encoder(const lzma_filter *filters)
lzma_raw_encoder_memusage(const lzma_filter *filters)
{
return lzma_memusage_coder(
return lzma_raw_coder_memusage(
(lzma_filter_find)(&encoder_find), filters);
}

View file

@ -200,7 +200,7 @@ stream_decode(lzma_coder *coder, lzma_allocator *allocator,
allocator, coder->buffer));
// Check the memory usage limit.
const uint64_t memusage = lzma_memusage_decoder(filters);
const uint64_t memusage = lzma_raw_decoder_memusage(filters);
lzma_ret ret;
if (memusage == UINT64_MAX) {

View file

@ -158,10 +158,10 @@ coder_set_compression_settings(void)
uint64_t memory_usage;
uint64_t memory_limit;
if (opt_mode == MODE_COMPRESS) {
memory_usage = lzma_memusage_encoder(filters);
memory_usage = lzma_raw_encoder_memusage(filters);
memory_limit = hardware_memlimit_encoder();
} else {
memory_usage = lzma_memusage_decoder(filters);
memory_usage = lzma_raw_decoder_memusage(filters);
memory_limit = hardware_memlimit_decoder();
}
@ -212,7 +212,7 @@ coder_set_compression_settings(void)
if (opt->dict_size < (UINT32_C(1) << 20))
memlimit_too_small(memory_usage, memory_limit);
memory_usage = lzma_memusage_encoder(filters);
memory_usage = lzma_raw_encoder_memusage(filters);
if (memory_usage == UINT64_MAX)
message_bug();