Code review for simplehash.h.
authorThomas Munro <[email protected]>
Tue, 28 Aug 2018 00:32:22 +0000 (12:32 +1200)
committerThomas Munro <[email protected]>
Tue, 28 Aug 2018 00:32:22 +0000 (12:32 +1200)
commitee0e2745c2f2c8ac47250dde718ac712686a79aa
treebdefbac92d3fc7774c5cd6f839ec09163dc191b8
parent7a3b7bbfded3142aaa8edae2dbc88999568cc1cd
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
src/include/lib/simplehash.h