Change definitions of bitmap flags to bit-shifting style - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Change definitions of bitmap flags to bit-shifting style
Date
Msg-id 81629061-24f5-2722-83cb-b162d6a1a5fd@enterprisedb.com
Whole thread Raw
Responses Re: Change definitions of bitmap flags to bit-shifting style
List pgsql-hackers
The attached patch changes definitions like

     #define FOO 0x01
     #define BAR 0x02

to

     #define FOO (1 << 0)
     #define BAR (1 << 1)

etc.

Both styles are currently in use, but the latter style seems more 
readable and easier to update.

This change only addresses bitmaps used in memory (e.g., for parsing or 
specific function APIs), where the actual bits don't really matter. 
Bits that might go on disk weren't touched.  There, defining the bits in 
a more concrete way seems better.

Attachment

pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: [PATCH] Keeps tracking the uniqueness with UniqueKey
Next
From: Bruce Momjian
Date:
Subject: Re: Proposed patch for key managment