aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-02-23 14:26:39 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-02-23 14:27:02 +0100
commit454c182f8542890d0e2eac85f70d9a254a34fce3 (patch)
treeb943eb0aab64a1617a889314ccb5dc1f3d315713 /src/include
parentebdccead1647aec1122810dad498438d9964f35f (diff)
downloadpostgresql-454c182f8542890d0e2eac85f70d9a254a34fce3.tar.gz
postgresql-454c182f8542890d0e2eac85f70d9a254a34fce3.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/libpq/libpq.h2
-rw-r--r--src/include/libpq/pqformat.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h
index 8defcb6de19..aeb66ca40cf 100644
--- a/src/include/libpq/libpq.h
+++ b/src/include/libpq/libpq.h
@@ -71,7 +71,7 @@ extern int AcceptConnection(pgsocket server_fd, ClientSocket *client_sock);
extern void TouchSocketFiles(void);
extern void RemoveSocketFiles(void);
extern Port *pq_init(ClientSocket *client_sock);
-extern int pq_getbytes(char *s, size_t len);
+extern int pq_getbytes(void *b, size_t len);
extern void pq_startmsgread(void);
extern void pq_endmsgread(void);
extern bool pq_is_reading_msg(void);
diff --git a/src/include/libpq/pqformat.h b/src/include/libpq/pqformat.h
index 6b1a31f8541..9a1534be521 100644
--- a/src/include/libpq/pqformat.h
+++ b/src/include/libpq/pqformat.h
@@ -200,7 +200,7 @@ extern int64 pq_getmsgint64(StringInfo msg);
extern float4 pq_getmsgfloat4(StringInfo msg);
extern float8 pq_getmsgfloat8(StringInfo msg);
extern const char *pq_getmsgbytes(StringInfo msg, int datalen);
-extern void pq_copymsgbytes(StringInfo msg, char *buf, int datalen);
+extern void pq_copymsgbytes(StringInfo msg, void *buf, int datalen);
extern char *pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes);
extern const char *pq_getmsgstring(StringInfo msg);
extern const char *pq_getmsgrawstring(StringInfo msg);