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

Commit060b069

Browse files
committed
Work around overly strict restrict checks by MSVC.
Apparently MSVC requires a * before a restrict in a variabledeclaration, even if the adorned type already is a pointer, just viatypedef.As reported by buildfarm animal woodlouse.Author: Andres FreundDiscussion:https://postgr.es/m/20171012001320.4putagiruuehtvb6@alap3.anarazel.de
1 parent4c119fb commit060b069

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/include/libpq/pqformat.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ extern void pq_sendfloat8(StringInfo buf, float8 f);
4242
* assumption that buf, buf->len, buf->data and *buf->data don't
4343
* overlap. Without the annotation buf->len etc cannot be kept in a register
4444
* over subsequent pq_writeint* calls.
45+
*
46+
* The use of StringInfoData * rather than StringInfo is due to MSVC being
47+
* overly picky and demanding a * before a restrict.
4548
*/
4649
staticinlinevoid
47-
pq_writeint8(StringInfo restrictbuf,int8i)
50+
pq_writeint8(StringInfoData* restrictbuf,int8i)
4851
{
4952
int8ni=i;
5053

@@ -58,7 +61,7 @@ pq_writeint8(StringInfo restrict buf, int8 i)
5861
* preallocated.
5962
*/
6063
staticinlinevoid
61-
pq_writeint16(StringInfo restrictbuf,int16i)
64+
pq_writeint16(StringInfoData* restrictbuf,int16i)
6265
{
6366
int16ni=pg_hton16(i);
6467

@@ -72,7 +75,7 @@ pq_writeint16(StringInfo restrict buf, int16 i)
7275
* preallocated.
7376
*/
7477
staticinlinevoid
75-
pq_writeint32(StringInfo restrictbuf,int32i)
78+
pq_writeint32(StringInfoData* restrictbuf,int32i)
7679
{
7780
int32ni=pg_hton32(i);
7881

@@ -86,7 +89,7 @@ pq_writeint32(StringInfo restrict buf, int32 i)
8689
* preallocated.
8790
*/
8891
staticinlinevoid
89-
pq_writeint64(StringInfo restrictbuf,int64i)
92+
pq_writeint64(StringInfoData* restrictbuf,int64i)
9093
{
9194
int64ni=pg_hton64(i);
9295

@@ -106,7 +109,7 @@ pq_writeint64(StringInfo restrict buf, int64 i)
106109
* sent to the frontend.
107110
*/
108111
staticinlinevoid
109-
pq_writestring(StringInfo restrictbuf,constchar*restrictstr)
112+
pq_writestring(StringInfoData* restrictbuf,constchar*restrictstr)
110113
{
111114
intslen=strlen(str);
112115
char*p;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp