]> granicus.if.org Git - xz/commitdiff
Put the unstable APIs behind #ifdef LZMA_UNSTABLE.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 12 Apr 2011 09:42:37 +0000 (12:42 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 12 Apr 2011 09:42:37 +0000 (12:42 +0300)
This way people hopefully won't complain if these APIs
change and break code that used an older API.

src/liblzma/api/lzma/container.h
src/liblzma/common/common.h
src/xz/private.h

index e68c89401ab75acd8fbd42a445d7473517405b14..499d8b9aca3cedef4056e9ac8eed819b72daea3a 100644 (file)
@@ -60,6 +60,7 @@
 #define LZMA_PRESET_EXTREME       (UINT32_C(1) << 31)
 
 
+#ifdef LZMA_UNSTABLE /* Unstable API that may change. Use only for testing. */
 /**
  * \brief       Multithreading options
  */
@@ -179,6 +180,7 @@ typedef struct {
        void *reserved_ptr4;
 
 } lzma_mt;
+#endif
 
 
 /**
@@ -311,6 +313,7 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
                lzma_nothrow lzma_attr_warn_unused_result;
 
 
+#ifdef LZMA_UNSTABLE /* Unstable API that may change. Use only for testing. */
 /**
  * \brief       Calculate approximate memory usage of multithreaded .xz encoder
  *
@@ -351,6 +354,7 @@ extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
 extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
                lzma_stream *strm, const lzma_mt *options)
                lzma_nothrow lzma_attr_warn_unused_result;
+#endif
 
 
 /**
index 8e9a387cfccc9c17a12980f67a1f345d78224c33..9d776f9ac9560911b3468fa9322d00c5a70cc6af 100644 (file)
@@ -32,6 +32,8 @@
 
 #define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
 
+#define LZMA_UNSTABLE
+
 #include "lzma.h"
 
 // These allow helping the compiler in some often-executed branches, whose
index 6b01e51354e1cfcbc526b060dd92a8c5bf67037b..978f81a3cb945eeb4d24e80e0ccb885aff002425 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "sysdefs.h"
 #include "mythread.h"
+
+#define LZMA_UNSTABLE
 #include "lzma.h"
 
 #include <sys/types.h>