On Tue, Aug 28, 2018 at 1:40 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.mu...@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

Reply via email to