Re: simplehash.h comment - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: simplehash.h comment
Date
Msg-id CAEepm=02Vc9P9zPO5b9R9SieQBDaiMqtWSUf4sHvgeJj-f-RXA@mail.gmail.com
Whole thread Raw
In response to Re: simplehash.h comment  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Aug 28, 2018 at 1:40 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
> > ... and a patch.  Thoughts?
>
> It's not real obvious why you're adding inclusion guards over just a
> subset of the header.  A short comment about that would be worthwhile.

Right, thanks.  I added a comment and committed.

Obviously the longer term fix for that particular issue is not to
define those functions in that header at all.   If no one beats me to
it, I'd like to have another look at consolidating all our popcount()
and ffs() functions[1], and this fls()/log2(), pow2() stuff seems like
it might be part of the same refactoring expedition.  For now I just
added the missing include guards to unblock some other stuff I'm about
to propose that wants to use simplehash.h.

[1]
https://www.postgresql.org/message-id/flat/CAEepm%3D3k%2B%2BYtf2LNQCvpP6m1%3DgY9zZHP_cfnn47%3DWTsoCrLCvA%40mail.gmail.com

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Bradley DeJong"
Date:
Subject: Re[2]: doc - improve description of default privileges
Next
From: Daniel Wood
Date:
Subject: First steps to being a contributer