summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.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/lz4hc.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/lz4hc.h')
-rw-r--r--lib/lz4hc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index 228bb11..3d441fb 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -220,8 +220,8 @@ struct LZ4HC_CCtx_internal
/* Do not use these definitions directly !
* Declare or allocate an LZ4_streamHC_t instead.
*/
-#define LZ4_STREAMHCSIZE_VOIDP ((sizeof(LZ4HC_CCtx_internal) + sizeof(void*)-1) / sizeof(void*))
-#define LZ4_STREAMHCSIZE (LZ4_STREAMHCSIZE_VOIDP * sizeof(void*))
+#define LZ4_STREAMHCSIZE 262200 /* static size, for inter-version compatibility */
+#define LZ4_STREAMHCSIZE_VOIDP (LZ4_STREAMHCSIZE / sizeof(void*))
union LZ4_streamHC_u {
void* table[LZ4_STREAMHCSIZE_VOIDP];
LZ4HC_CCtx_internal internal_donotuse;