Change definitions of bitmap flags to bit-shifting style

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Change definitions of bitmap flags to bit-shifting style
Дата
Msg-id 81629061-24f5-2722-83cb-b162d6a1a5fd@enterprisedb.com
обсуждение исходный текст
Ответы Re: Change definitions of bitmap flags to bit-shifting style  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andy Fan
Дата:
Сообщение: Re: [PATCH] Keeps tracking the uniqueness with UniqueKey
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposed patch for key managment