Convert macros to static inline functions (bufpage.h)
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pageinspect/rawpage.c | modified | +13 −11 |
| src/backend/storage/page/bufpage.c | modified | +9 −9 |
| src/bin/pg_checksums/pg_checksums.c | modified | +1 −1 |
| src/include/storage/bufpage.h | modified | +158 −99 |
| src/include/storage/checksum_impl.h | modified | +1 −1 |
Discussion
- Convert macros to static inline functions 12 messages · 2022-05-16 → 2025-02-11