summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-02-01 20:16:10 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-02-01 20:16:10 (GMT)
commit9485884eb940c5ec794d1bfc3432a4d9f8561921 (patch)
tree8d1f2b701c30241d4cc8514dcf5778a3e7f7386f
parent2327aa404e50d23c46d539646e63a6b0682b2dfc (diff)
downloadlz4-9485884eb940c5ec794d1bfc3432a4d9f8561921.zip
lz4-9485884eb940c5ec794d1bfc3432a4d9f8561921.tar.gz
lz4-9485884eb940c5ec794d1bfc3432a4d9f8561921.tar.bz2
minor interface modification : source pointers are now (const char*)
git-svn-id: https://lz4.googlecode.com/svn/trunk@53 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
-rw-r--r--bench.c4
-rw-r--r--lz4.c10
-rw-r--r--lz4.h8
3 files changed, 11 insertions, 11 deletions
diff --git a/bench.c b/bench.c
index f99497e..7c228f9 100644
--- a/bench.c
+++ b/bench.c
@@ -80,8 +80,8 @@ struct chunkParameters
struct compressionParameters
{
- int (*compressionFunction)(char*, char*, int);
- int (*decompressionFunction)(char*, char*, int);
+ int (*compressionFunction)(const char*, char*, int);
+ int (*decompressionFunction)(const char*, char*, int);
};
diff --git a/lz4.c b/lz4.c
index 4bc306c..036ba53 100644
--- a/lz4.c
+++ b/lz4.c
@@ -279,7 +279,7 @@ inline static int LZ4_NbCommonBytes_BigEndian (register U32 val)
//******************************
int LZ4_compressCtx(void** ctx,
- char* source,
+ const char* source,
char* dest,
int isize)
{
@@ -421,7 +421,7 @@ _last_literals:
#define LZ4_HASH64K_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8)-HASHLOG64K))
#define LZ4_HASH64K_VALUE(p) LZ4_HASH64K_FUNCTION(A32(p))
int LZ4_compress64kCtx(void** ctx,
- char* source,
+ const char* source,
char* dest,
int isize)
{
@@ -555,7 +555,7 @@ _last_literals:
-int LZ4_compress(char* source,
+int LZ4_compress(const char* source,
char* dest,
int isize)
{
@@ -585,7 +585,7 @@ int LZ4_compress(char* source,
// They will never write nor read outside of the provided input and output buffers.
// A corrupted input will produce an error result, a negative int, indicating the position of the error within input stream.
-int LZ4_uncompress(char* source,
+int LZ4_uncompress(const char* source,
char* dest,
int osize)
{
@@ -669,7 +669,7 @@ _output_error:
int LZ4_uncompress_unknownOutputSize(
- char* source,
+ const char* source,
char* dest,
int isize,
int maxOutputSize)
diff --git a/lz4.h b/lz4.h
index 0251157..5e72e51 100644
--- a/lz4.h
+++ b/lz4.h
@@ -38,8 +38,8 @@ extern "C" {
// Simple Functions
//****************************
-int LZ4_compress (char* source, char* dest, int isize);
-int LZ4_uncompress (char* source, char* dest, int osize);
+int LZ4_compress (const char* source, char* dest, int isize);
+int LZ4_uncompress (const char* source, char* dest, int osize);
/*
LZ4_compress() :
@@ -61,7 +61,7 @@ LZ4_uncompress() :
// Advanced Functions
//****************************
-int LZ4_uncompress_unknownOutputSize (char* source, char* dest, int isize, int maxOutputSize);
+int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize);
/*
LZ4_uncompress_unknownOutputSize() :
@@ -74,7 +74,7 @@ LZ4_uncompress_unknownOutputSize() :
*/
-int LZ4_compressCtx(void** ctx, char* source, char* dest, int isize);
+int LZ4_compressCtx(void** ctx, const char* source, char* dest, int isize);
/*
LZ4_compressCtx() :