summaryrefslogtreecommitdiffstats
path: root/lib/lz4.h
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2020-11-07 02:26:13 (GMT)
committerYann Collet <cyan@fb.com>2020-11-07 02:26:13 (GMT)
commit67e661a2ad39258bcb5c6fcc31c9239ff3aabc71 (patch)
treebc1565db96c5aeeb2030ca4b3a8b6caf440a75e4 /lib/lz4.h
parent211d653ff866ee98a51ab135067369f52f6bdc7b (diff)
downloadlz4-67e661a2ad39258bcb5c6fcc31c9239ff3aabc71.zip
lz4-67e661a2ad39258bcb5c6fcc31c9239ff3aabc71.tar.gz
lz4-67e661a2ad39258bcb5c6fcc31c9239ff3aabc71.tar.bz2
static state size
for better inter-version compatibility
Diffstat (limited to 'lib/lz4.h')
-rw-r--r--lib/lz4.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index 026279b..c4324af 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -620,8 +620,8 @@ typedef struct {
* note : only use this definition in association with static linking !
* this definition is not API/ABI safe, and may change in future versions.
*/
-#define LZ4_STREAMSIZE_VOIDP ((sizeof(LZ4_stream_t_internal) + sizeof(void*)-1) / sizeof(void*))
-#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_VOIDP * sizeof(void*))
+#define LZ4_STREAMSIZE 16416 /* static size, for inter-version compatibility */
+#define LZ4_STREAMSIZE_VOIDP (LZ4_STREAMSIZE / sizeof(void*))
union LZ4_stream_u {
void* table[LZ4_STREAMSIZE_VOIDP];
LZ4_stream_t_internal internal_donotuse;