pgsql: Code review for simplehash.h. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Code review for simplehash.h.
Date
Msg-id E1fuRzn-0002tU-4s@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Code review for simplehash.h.

Fix reference to non-existent file in comment.

Add SH_ prefix to the EMPTY and IN_USE tokens, to reduce likelihood of
collisions with unrelated macros.

Add include guards around the function definitions that are not
"parameterized", so the header can be used again in the same translation
unit.

Undefine SH_EQUAL macro where other "parameter" macros are undefined, for
the same reason.

Author: Thomas Munro
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/CAEepm%3D1LdXZ3mMTM8tHt_b%3DK1kREit%3Dp8sikesak%3DkzHHM07Nw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ee0e2745c2f2c8ac47250dde718ac712686a79aa

Modified Files
--------------
src/include/lib/simplehash.h | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix snapshot leak warning for some procedures
Next
From: Peter Eisentraut
Date:
Subject: pgsql: pg_verify_checksums: Message style improvements and NLS support