Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c23bfd

Browse files
committed
Sprinkle some const decorations
This might help clarify the API a bit.
1 parent7ca8c97 commit7c23bfd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ static intinternal_putbytes(const char *s, size_t len);
166166
staticintinternal_flush(void);
167167

168168
#ifdefHAVE_UNIX_SOCKETS
169-
staticintLock_AF_UNIX(char*unixSocketDir,char*unixSocketPath);
170-
staticintSetup_AF_UNIX(char*sock_path);
169+
staticintLock_AF_UNIX(constchar*unixSocketDir,constchar*unixSocketPath);
170+
staticintSetup_AF_UNIX(constchar*sock_path);
171171
#endif/* HAVE_UNIX_SOCKETS */
172172

173173
staticconstPQcommMethodsPqCommSocketMethods= {
@@ -327,8 +327,8 @@ socket_close(int code, Datum arg)
327327
*/
328328

329329
int
330-
StreamServerPort(intfamily,char*hostName,unsigned shortportNumber,
331-
char*unixSocketDir,
330+
StreamServerPort(intfamily,constchar*hostName,unsigned shortportNumber,
331+
constchar*unixSocketDir,
332332
pgsocketListenSocket[],intMaxListen)
333333
{
334334
pgsocketfd;
@@ -611,7 +611,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
611611
* Lock_AF_UNIX -- configure unix socket file path
612612
*/
613613
staticint
614-
Lock_AF_UNIX(char*unixSocketDir,char*unixSocketPath)
614+
Lock_AF_UNIX(constchar*unixSocketDir,constchar*unixSocketPath)
615615
{
616616
/*
617617
* Grab an interlock file associated with the socket file.
@@ -642,7 +642,7 @@ Lock_AF_UNIX(char *unixSocketDir, char *unixSocketPath)
642642
* Setup_AF_UNIX -- configure unix socket permissions
643643
*/
644644
staticint
645-
Setup_AF_UNIX(char*sock_path)
645+
Setup_AF_UNIX(constchar*sock_path)
646646
{
647647
/*
648648
* Fix socket ownership/permission if requested. Note we must do this

‎src/include/libpq/libpq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ extern const PGDLLIMPORT PQcommMethods *PqCommMethods;
5555
*/
5656
externWaitEventSet*FeBeWaitSet;
5757

58-
externintStreamServerPort(intfamily,char*hostName,
59-
unsigned shortportNumber,char*unixSocketDir,
58+
externintStreamServerPort(intfamily,constchar*hostName,
59+
unsigned shortportNumber,constchar*unixSocketDir,
6060
pgsocketListenSocket[],intMaxListen);
6161
externintStreamConnection(pgsocketserver_fd,Port*port);
6262
externvoidStreamClose(pgsocketsock);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp