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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user