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

Commitfe8dd65

Browse files
committed
Mark misc static global variables as const
Reviewed-by: Andres FreundDiscussion:https://www.postgresql.org/message-id/54c29fb0-edf2-48ea-9814-44e918bbd6e8@iki.fi
1 parent85829c9 commitfe8dd65

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

‎contrib/btree_gist/btree_interval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static const gbtree_ninfo tinfo =
113113
Interval*
114114
abs_interval(Interval*a)
115115
{
116-
staticIntervalzero= {0,0,0};
116+
staticconstIntervalzero= {0,0,0};
117117

118118
if (DatumGetBool(DirectFunctionCall2(interval_lt,
119119
IntervalPGetDatum(a),

‎contrib/oid2name/oid2name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ voidsql_exec_dumpalltbspc(PGconn *conn, struct options *opts);
6262
void
6363
get_opts(intargc,char**argv,structoptions*my_opts)
6464
{
65-
staticstructoptionlong_options[]= {
65+
staticconststructoptionlong_options[]= {
6666
{"dbname",required_argument,NULL,'d'},
6767
{"host",required_argument,NULL,'h'},
6868
{"host",required_argument,NULL,'H'},/* deprecated */

‎src/backend/access/transam/xlogprefetcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ XLogPrefetcher *
362362
XLogPrefetcherAllocate(XLogReaderState*reader)
363363
{
364364
XLogPrefetcher*prefetcher;
365-
staticHASHCTLhash_table_ctl= {
365+
constHASHCTLhash_table_ctl= {
366366
.keysize=sizeof(RelFileLocator),
367367
.entrysize=sizeof(XLogPrefetcherFilter)
368368
};

‎src/common/sha1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#include"sha1_int.h"
6262

6363
/* constant table */
64-
staticuint32_K[]= {0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6};
64+
staticconstuint32_K[]= {0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6};
6565

6666
#defineK(t)_K[(t) / 20]
6767

‎src/pl/plpython/plpy_cursorobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static PyObject *PLy_cursor_iternext(PyObject *self);
2727
staticPyObject*PLy_cursor_fetch(PyObject*self,PyObject*args);
2828
staticPyObject*PLy_cursor_close(PyObject*self,PyObject*unused);
2929

30-
staticcharPLy_cursor_doc[]="Wrapper around a PostgreSQL cursor";
30+
staticconstcharPLy_cursor_doc[]="Wrapper around a PostgreSQL cursor";
3131

3232
staticPyMethodDefPLy_cursor_methods[]= {
3333
{"fetch",PLy_cursor_fetch,METH_VARARGS,NULL},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp