From 1f605b82ba66ece8b421b10d41094dd2e3c0c48b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 30 Dec 2022 10:59:25 +0100 Subject: Change argument of appendBinaryStringInfo from char * to void * There is some code that uses this function to assemble some kind of packed binary layout, which requires a bunch of casts because of this. Functions taking binary data plus length should take void * instead, like memcpy() for example. Discussion: https://www.postgresql.org/message-id/flat/a0086cfc-ff0f-2827-20fe-52b591d2666c%40enterprisedb.com --- src/include/lib/stringinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/lib/stringinfo.h') diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 9b755c48831..63ea1eca630 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -142,7 +142,7 @@ extern void appendStringInfoSpaces(StringInfo str, int count); * if necessary. */ extern void appendBinaryStringInfo(StringInfo str, - const char *data, int datalen); + const void *data, int datalen); /*------------------------ * appendBinaryStringInfoNT @@ -150,7 +150,7 @@ extern void appendBinaryStringInfo(StringInfo str, * if necessary. Does not ensure a trailing null-byte exists. */ extern void appendBinaryStringInfoNT(StringInfo str, - const char *data, int datalen); + const void *data, int datalen); /*------------------------ * enlargeStringInfo -- cgit v1.2.3