git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] (encode_85, decode_85): Mark source buffer pointer as "const".

From
Jim Meyering <jim@meyering.net>
Date
Apr 9, 2007, 22:56 UTC
Message-ID
<877islxila.fsf@rho.meyering.net>
Signed-off-by: Jim Meyering <jim@meyering.net>
---
 base85.c |    4 ++--
 cache.h  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/base85.c b/base85.c
index a9e97f8..a6c41d5 100644
--- a/base85.c
+++ b/base85.c
@@ -37,7 +37,7 @@ static void prep_base85(void)
 	}
 }
 
-int decode_85(char *dst, char *buffer, int len)
+int decode_85(char *dst, const char *buffer, int len)
 {
 	prep_base85();
 
@@ -82,7 +82,7 @@ int decode_85(char *dst, char *buffer, int len)
 	return 0;
 }
 
-void encode_85(char *buf, unsigned char *data, int bytes)
+void encode_85(char *buf, const unsigned char *data, int bytes)
 {
 	prep_base85();
 
diff --git a/cache.h b/cache.h
index eb57507..b1bd9e4 100644
--- a/cache.h
+++ b/cache.h
@@ -472,8 +472,8 @@ extern int pager_in_use;
 extern int pager_use_color;
 
 /* base85 */
-int decode_85(char *dst, char *line, int linelen);
-void encode_85(char *buf, unsigned char *data, int bytes);
+int decode_85(char *dst, const char *line, int linelen);
+void encode_85(char *buf, const unsigned char *data, int bytes);
 
 /* alloc.c */
 struct blob;
-- 
1.5.1.rc3-dirty
Message 1 of 1 in “(encode_85, decode_85): Mark source buffer pointer as "const".”
  1. (encode_85, decode_85): Mark source buffer pointer as "const".Jim Meyering, Apr 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.