diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2022-12-30 10:59:25 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2022-12-30 11:05:09 +0100 |
commit | 1f605b82ba66ece8b421b10d41094dd2e3c0c48b (patch) | |
tree | 0274b67eba350574344af68f4b4bbaf3f7c5ba1e /src/common/stringinfo.c | |
parent | 33a33f0ba4d70a704e2d6bb8ee85f29fe18cead9 (diff) | |
download | postgresql-1f605b82ba66ece8b421b10d41094dd2e3c0c48b.tar.gz postgresql-1f605b82ba66ece8b421b10d41094dd2e3c0c48b.zip |
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
Diffstat (limited to 'src/common/stringinfo.c')
-rw-r--r-- | src/common/stringinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c index 76ff4d3e245..66a64180c96 100644 --- a/src/common/stringinfo.c +++ b/src/common/stringinfo.c @@ -224,7 +224,7 @@ appendStringInfoSpaces(StringInfo str, int count) * if necessary. Ensures that a trailing null byte is present. */ void -appendBinaryStringInfo(StringInfo str, const char *data, int datalen) +appendBinaryStringInfo(StringInfo str, const void *data, int datalen) { Assert(str != NULL); @@ -250,7 +250,7 @@ appendBinaryStringInfo(StringInfo str, const char *data, int datalen) * if necessary. Does not ensure a trailing null-byte exists. */ void -appendBinaryStringInfoNT(StringInfo str, const char *data, int datalen) +appendBinaryStringInfoNT(StringInfo str, const void *data, int datalen) { Assert(str != NULL); |