From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: move some bitmapset.c macros to bitmapset.h |
Date: | 2022-12-05 12:05:49 |
Message-ID: | 20221205120549.vs2h4lg5jsh2tytt@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | gkokolatos | 2022-12-05 12:48:28 | Re: Add LZ4 compression in pg_dump |
Previous Message | John Naylor | 2022-12-05 11:51:50 | move some bitmapset.c macros to bitmapset.h |