summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.h4
-rw-r--r--lib/lz4hc.h4
2 files changed, 4 insertions, 4 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;
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;