1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-16 16:42:29 +03:00

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
This commit is contained in:
Peter Eisentraut
2022-12-30 10:59:25 +01:00
parent 33a33f0ba4
commit 1f605b82ba
4 changed files with 15 additions and 15 deletions

View File

@@ -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