summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorW. Felix Handte <w@felixhandte.com>2018-10-16 00:22:37 (GMT)
committerW. Felix Handte <w@felixhandte.com>2018-10-16 00:22:37 (GMT)
commit45dc195f8405a1c8dfbb96e597f021df26e193bc (patch)
tree518fe8329893e3c9bc1d4e5c3a13a6da235e13b8 /lib
parenta963621eb0938a991c417ec75cbfe85bee684fdd (diff)
downloadlz4-45dc195f8405a1c8dfbb96e597f021df26e193bc.zip
lz4-45dc195f8405a1c8dfbb96e597f021df26e193bc.tar.gz
lz4-45dc195f8405a1c8dfbb96e597f021df26e193bc.tar.bz2
Change Comment and Make LZ4LIB_STATIC_API Available to LZ4HC
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index 346f0dc..3478831 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -385,27 +385,26 @@ LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* src, char* dst, int sr
LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize);
-/*^**********************************************
+/*^*************************************
* !!!!!! STATIC LINKING ONLY !!!!!!
- ***********************************************/
+ ***************************************/
-/*-************************************
- * Unstable declarations
- **************************************
- * Declarations in this section must be considered unstable.
- * Their signatures may change, or may be removed in the future.
- * They are therefore only safe to depend on
- * when the caller is statically linked against the library.
- * To access their declarations, define LZ4_STATIC_LINKING_ONLY.
- **************************************/
-
-#ifdef LZ4_STATIC_LINKING_ONLY
-
-/* By default, symbols in this section aren't published into shared/dynamic libraries.
- * You can override this behavior and force them to be published
- * by defining LZ4_PUBLISH_STATIC_FUNCTIONS.
- * Use at your own risk.
- */
+/*-****************************************************************************
+ * Symbols declared in this section must be considered unstable. Their
+ * signatures or semantics may change, or they may be removed altogether in the
+ * future. They are therefore only safe to depend on when the caller is
+ * statically linked against the library.
+ *
+ * To protect against unsafe usage, not only are the declarations guarded, the
+ * definitions are hidden by default when building LZ4 as a shared/dynamic
+ * library.
+ *
+ * In order to access these declarations, define LZ4_STATIC_LINKING_ONLY in
+ * your application before including LZ4's headers.
+ *
+ * In order to make their implementations accessible dynamically, you must
+ * define LZ4_PUBLISH_STATIC_FUNCTIONS when building the LZ4 library.
+ ******************************************************************************/
#ifdef LZ4_PUBLISH_STATIC_FUNCTIONS
#define LZ4LIB_STATIC_API LZ4LIB_API
@@ -413,6 +412,8 @@ LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int or
#define LZ4LIB_STATIC_API
#endif
+#ifdef LZ4_STATIC_LINKING_ONLY
+
/*! LZ4_resetStream_fast() :
* Use this to prepare a context for a new chain of calls to a streaming API
* (e.g., LZ4_compress_fast_continue()).