Re: move some bitmapset.c macros to bitmapset.h

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: move some bitmapset.c macros to bitmapset.h
Дата
Msg-id 20221205120549.vs2h4lg5jsh2tytt@alvherre.pgsql
обсуждение исходный текст
Ответ на move some bitmapset.c macros to bitmapset.h  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: move some bitmapset.c macros to bitmapset.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2022-Dec-05, John Naylor wrote:

> diff --git a/src/backend/nodes/bitmapset.c b/src/backend/nodes/bitmapset.c
> index b7b274aeff..3204b49738 100644
> --- a/src/backend/nodes/bitmapset.c
> +++ b/src/backend/nodes/bitmapset.c
> @@ -26,33 +26,9 @@
>  #include "port/pg_bitutils.h"
>  
>  
> -#define WORDNUM(x)    ((x) / BITS_PER_BITMAPWORD)
> -#define BITNUM(x)    ((x) % BITS_PER_BITMAPWORD)

In this location, nobody can complain about the naming of these macros,
since they're just used to implement other bitmapset.c code.  However,
if you move them to the .h file, ISTM you should give them more
meaningful names.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Oh, great altar of passive entertainment, bestow upon me thy discordant images
at such speed as to render linear thought impossible" (Calvin a la TV)



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

Предыдущее
От: John Naylor
Дата:
Сообщение: move some bitmapset.c macros to bitmapset.h
Следующее
От: gkokolatos@pm.me
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump