Convert macros to static inline functions (bufpage.h)
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Jul 2022 05:20:35 +0000 (07:20 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Jul 2022 05:21:52 +0000 (07:21 +0200)
commit2cd2569c72b8920048e35c31c9be30a6170e1410
tree4301fc14ecbd9a2eba1579733fff3932babc226e
parenteed959a457ea0ffb042f4881e23358ba145d148c
Convert macros to static inline functions (bufpage.h)

Remove PageIsValid() and PageSizeIsValid(), which weren't used and
seem unnecessary.

Some code using these formerly-macros needs some adjustments because
it was previously playing loose with the Page vs. PageHeader types,
which is no longer possible with the functions instead of macros.

Reviewed-by: Amul Sul <sulamul@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517%40enterprisedb.com
contrib/pageinspect/rawpage.c
src/backend/storage/page/bufpage.c
src/bin/pg_checksums/pg_checksums.c
src/include/storage/bufpage.h
src/include/storage/checksum_impl.h