]> granicus.if.org Git - xz/commitdiff
Beta was supposed to be API stable but I had forgot to rename
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 17 Jan 2009 12:24:25 +0000 (14:24 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 17 Jan 2009 12:24:25 +0000 (14:24 +0200)
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.

src/liblzma/api/lzma/filter.h
src/liblzma/common/easy.c
src/liblzma/common/filter_common.c
src/liblzma/common/filter_common.h
src/liblzma/common/filter_decoder.c
src/liblzma/common/filter_encoder.c
src/liblzma/common/stream_decoder.c
src/xz/process.c

index 05c0c77b4d9b495a8307355ef818bb5c190f130a..13c3bdc3725d3930b407e0d85ce54dc61484d49a 100644 (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;
 
 
index 441e66c0e0c4fc7be1d71aba1cac97d18df5b790..2294ba70f98b3c51c0888843ac9fa436f7e39ace 100644 (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);
 }
index fe3c03a211f264c4fc2af37bc34c9fc58d4fe02b..1a5860c8fe09225084a343a88d36214908fcd5ca 100644 (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.
index 5241e5dfb304dce662b32a79b3370571ea364783..a401ee7650bfc4ad1462542a026f8ead00dea261 100644 (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);
 
 
index c969a5549538e28015141f26092c64065d5e8ada..2b6ff840d8e1056dbb3571597ccbf04a1ce321bb 100644 (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);
 }
 
index c9d6b91ef9396eae1cf0bfc161bfa52bfb1b5d5e..661a54db9ae080f3e61ed3d9ee10bef61a35cdef 100644 (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);
 }
 
index 7ed5c3afe66626f85e1bd3f44ee51cad1bba9c9c..66dfa778bc0704fd9dc2185ac0938574fbed38e6 100644 (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) {
index e6870f815e5c67b28630492b81c362641ebff7ee..59c19cd2d0e8d80608a2a0dd6ec2fad5d5b414fb 100644 (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();