summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Solontsov <vsolontsov@volanttrading.com>2022-11-22 13:26:18 (GMT)
committerVladimir Solontsov <vsolontsov@volanttrading.com>2022-11-22 13:26:18 (GMT)
commite4ea198b444bca0d9b0d18014311785a9c61eb8f (patch)
tree3d15d633a0b0308e1fbb3e485b0a339e99448d34
parent214bfb325bd4db112b73859912b919aa35e12d61 (diff)
downloadlz4-e4ea198b444bca0d9b0d18014311785a9c61eb8f.zip
lz4-e4ea198b444bca0d9b0d18014311785a9c61eb8f.tar.gz
lz4-e4ea198b444bca0d9b0d18014311785a9c61eb8f.tar.bz2
Fixed const-ness of src data pointer in lz4file and install lz4file.h
-rw-r--r--lib/lz4file.c4
-rw-r--r--lib/lz4file.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/lz4file.c b/lib/lz4file.c
index eaf9b17..982afe4 100644
--- a/lib/lz4file.c
+++ b/lib/lz4file.c
@@ -247,9 +247,9 @@ LZ4F_errorCode_t LZ4F_writeOpen(LZ4_writeFile_t** lz4fWrite, FILE* fp, const LZ4
return LZ4F_OK_NoError;
}
-size_t LZ4F_write(LZ4_writeFile_t* lz4fWrite, void* buf, size_t size)
+size_t LZ4F_write(LZ4_writeFile_t* lz4fWrite, const void* buf, size_t size)
{
- LZ4_byte* p = (LZ4_byte*)buf;
+ const LZ4_byte* p = (const LZ4_byte*)buf;
size_t remain = size;
size_t chunk;
size_t ret;
diff --git a/lib/lz4file.h b/lib/lz4file.h
index 5527130..723552c 100644
--- a/lib/lz4file.h
+++ b/lib/lz4file.h
@@ -78,7 +78,7 @@ LZ4FLIB_STATIC_API LZ4F_errorCode_t LZ4F_writeOpen(LZ4_writeFile_t** lz4fWrite,
* `buf` write data buffer.
* `size` write data buffer size.
*/
-LZ4FLIB_STATIC_API size_t LZ4F_write(LZ4_writeFile_t* lz4fWrite, void* buf, size_t size);
+LZ4FLIB_STATIC_API size_t LZ4F_write(LZ4_writeFile_t* lz4fWrite, const void* buf, size_t size);
/*! LZ4F_writeClose() :
* Close lz4file handle.