mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
backend libpq void * argument for binary data
Change some backend libpq functions to take void * for binary data instead of char *. This removes the need for numerous casts. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
This commit is contained in:
@@ -361,7 +361,7 @@ bit_recv(PG_FUNCTION_ARGS)
|
||||
SET_VARSIZE(result, len);
|
||||
VARBITLEN(result) = bitlen;
|
||||
|
||||
pq_copymsgbytes(buf, (char *) VARBITS(result), VARBITBYTES(result));
|
||||
pq_copymsgbytes(buf, VARBITS(result), VARBITBYTES(result));
|
||||
|
||||
/* Make sure last byte is correctly zero-padded */
|
||||
VARBIT_PAD(result);
|
||||
@@ -666,7 +666,7 @@ varbit_recv(PG_FUNCTION_ARGS)
|
||||
SET_VARSIZE(result, len);
|
||||
VARBITLEN(result) = bitlen;
|
||||
|
||||
pq_copymsgbytes(buf, (char *) VARBITS(result), VARBITBYTES(result));
|
||||
pq_copymsgbytes(buf, VARBITS(result), VARBITBYTES(result));
|
||||
|
||||
/* Make sure last byte is correctly zero-padded */
|
||||
VARBIT_PAD(result);
|
||||
|
||||
Reference in New Issue
Block a user