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

Commitad7b47a

Browse files
committed
Fix sloppy macro coding (not enough parentheses).
1 parentff7da2f commitad7b47a

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

‎src/include/access/xact.h

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*-------------------------------------------------------------------------
22
*
33
* xact.h
4-
* postgres transaction systemheader
4+
* postgres transaction systemdefinitions
55
*
66
*
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: xact.h,v 1.26 2000/06/08 22:37:38 momjian Exp $
10+
* $Id: xact.h,v 1.27 2000/07/28 01:04:40 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -17,6 +17,17 @@
1717
#include"access/transam.h"
1818
#include"utils/nabstime.h"
1919

20+
/*
21+
* Xact isolation levels
22+
*/
23+
#defineXACT_DIRTY_READ0/* not implemented */
24+
#defineXACT_READ_COMMITTED1
25+
#defineXACT_REPEATABLE_READ2/* not implemented */
26+
#defineXACT_SERIALIZABLE3
27+
28+
externintDefaultXactIsoLevel;
29+
externintXactIsoLevel;
30+
2031
/* ----------------
2132
*transaction state structure
2233
* ----------------
@@ -31,16 +42,7 @@ typedef struct TransactionStateData
3142
intblockState;
3243
}TransactionStateData;
3344

34-
/*
35-
* Xact isolation levels
36-
*/
37-
#defineXACT_DIRTY_READ0/* not implemented */
38-
#defineXACT_READ_COMMITTED1
39-
#defineXACT_REPEATABLE_READ2/* not implemented */
40-
#defineXACT_SERIALIZABLE3
41-
42-
externintDefaultXactIsoLevel;
43-
externintXactIsoLevel;
45+
typedefTransactionStateData*TransactionState;
4446

4547
/* ----------------
4648
*transaction states
@@ -64,23 +66,16 @@ extern intXactIsoLevel;
6466
#defineTBLOCK_ABORT4
6567
#defineTBLOCK_ENDABORT5
6668

67-
typedefTransactionStateData*TransactionState;
68-
69-
#defineTransactionIdIsValid(xid)((bool) (xid != NullTransactionId))
69+
/* ----------------
70+
*transaction ID manipulation macros
71+
* ----------------
72+
*/
73+
#defineTransactionIdIsValid(xid)((bool) ((xid) != NullTransactionId))
74+
#defineTransactionIdEquals(id1,id2)((bool) ((id1) == (id2)))
7075
#defineTransactionIdStore(xid,dest)\
71-
(*((TransactionId*)dest) = (TransactionId)xid)
76+
(*((TransactionId*) (dest)) = (TransactionId) (xid))
7277
#defineStoreInvalidTransactionId(dest) \
73-
(*((TransactionId*)dest) = NullTransactionId)
74-
75-
76-
/* ----------------------------------------------------------------
77-
*TransactionIdEquals
78-
* ----------------------------------------------------------------
79-
*/
80-
#defineTransactionIdEquals(id1,id2) \
81-
( \
82-
((bool) ((id1) == (id2))) \
83-
)
78+
(*((TransactionId*) (dest)) = NullTransactionId)
8479

8580

8681
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp