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

Commit5553cbd

Browse files
committed
Add some const decorations
1 parent9a50f2e commit5553cbd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎src/backend/commands/copyto.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0";
116116
staticvoidEndCopy(CopyToStatecstate);
117117
staticvoidClosePipeToProgram(CopyToStatecstate);
118118
staticvoidCopyOneRowTo(CopyToStatecstate,TupleTableSlot*slot);
119-
staticvoidCopyAttributeOutText(CopyToStatecstate,char*string);
120-
staticvoidCopyAttributeOutCSV(CopyToStatecstate,char*string,
119+
staticvoidCopyAttributeOutText(CopyToStatecstate,constchar*string);
120+
staticvoidCopyAttributeOutCSV(CopyToStatecstate,constchar*string,
121121
booluse_quote,boolsingle_attr);
122122

123123
/* Low-level communications functions */
@@ -1009,10 +1009,10 @@ CopyOneRowTo(CopyToState cstate, TupleTableSlot *slot)
10091009
} while (0)
10101010

10111011
staticvoid
1012-
CopyAttributeOutText(CopyToStatecstate,char*string)
1012+
CopyAttributeOutText(CopyToStatecstate,constchar*string)
10131013
{
1014-
char*ptr;
1015-
char*start;
1014+
constchar*ptr;
1015+
constchar*start;
10161016
charc;
10171017
chardelimc=cstate->opts.delim[0];
10181018

@@ -1162,11 +1162,11 @@ CopyAttributeOutText(CopyToState cstate, char *string)
11621162
* CSV-style escaping
11631163
*/
11641164
staticvoid
1165-
CopyAttributeOutCSV(CopyToStatecstate,char*string,
1165+
CopyAttributeOutCSV(CopyToStatecstate,constchar*string,
11661166
booluse_quote,boolsingle_attr)
11671167
{
1168-
char*ptr;
1169-
char*start;
1168+
constchar*ptr;
1169+
constchar*start;
11701170
charc;
11711171
chardelimc=cstate->opts.delim[0];
11721172
charquotec=cstate->opts.quote[0];
@@ -1194,7 +1194,7 @@ CopyAttributeOutCSV(CopyToState cstate, char *string,
11941194
use_quote= true;
11951195
else
11961196
{
1197-
char*tptr=ptr;
1197+
constchar*tptr=ptr;
11981198

11991199
while ((c=*tptr)!='\0')
12001200
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp