diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2018-10-16 22:33:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 22:33:58 (GMT) |
commit | 1b819bfd633ae285df2dfe1b0589e1ec064f2873 (patch) | |
tree | 7502b45264cd7c60e0872fc1d5cd25914f3c838d /lib/lz4.h | |
parent | bf9bf80f8d06aab75347ed6df62758511e91fbe3 (diff) | |
parent | 6a2da13cb7adb8da42cbfd7c1d47ea5680009f27 (diff) | |
download | lz4-1b819bfd633ae285df2dfe1b0589e1ec064f2873.zip lz4-1b819bfd633ae285df2dfe1b0589e1ec064f2873.tar.gz lz4-1b819bfd633ae285df2dfe1b0589e1ec064f2873.tar.bz2 |
Merge pull request #593 from felixhandte/lz4hc-publish-static
Extend Macro to Allow Publishing Experimental LZ4HC Functions in Dynamic Libraries
Diffstat (limited to 'lib/lz4.h')
-rw-r--r-- | lib/lz4.h | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -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()). |