Re: Remove fls(), use pg_bitutils.h facilities instead?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: Remove fls(), use pg_bitutils.h facilities instead?
Date: 2022-07-20 13:48:36
Message-ID: 1692961.1658324916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> That double eval macro wasn't nice. This time with a static inline function.

Seems like passing a size_t to pg_leftmost_one_pos32 isn't great.
It was just as wrong before (if the caller-supplied argument is
indeed a size_t), but no time like the present to fix it.

We could have pg_bitutils.h #define pg_leftmost_one_pos_size_t
as the appropriate one of pg_leftmost_one_pos32/64, perhaps.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-07-20 13:54:03 Re: pgsql: Default to hidden visibility for extension libraries where possi
Previous Message Tom Lane 2022-07-20 13:38:50 Re: pgsql: Default to hidden visibility for extension libraries where possi