Re: move some bitmapset.c macros to bitmapset.h
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-12-05T12:05:49Z
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)
Commits
-
Move some bitmap logic out of bitmapset.c
- 3e76a806cbb0 17.0 landed