pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert macros to static inline functions (bufpage.h)
Date: Mon, 11 Jul 2022 05:29:58 +0000
Message-ID: <E1oAlzZ-002E5E-0L@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2cd2569c72b8920048e35c31c9be30a6170e1410

Modified Files
--------------
contrib/pageinspect/rawpage.c       |  24 ++--
src/backend/storage/page/bufpage.c  |  18 +--
src/bin/pg_checksums/pg_checksums.c |   2 +-
src/include/storage/bufpage.h       | 257 ++++++++++++++++++++++--------------
src/include/storage/checksum_impl.h |   2 +-
5 files changed, 182 insertions(+), 121 deletions(-)



view thread (10+ messages)  latest in thread

Message-ID: <E1oAlzZ-002E5E-0L@gemulon.postgresql.org>
Permalink:  ../E1oAlzZ-002E5E-0L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oAlzZ-002E5E-0L@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Convert macros to static inline functions (bufpage.h)
  In-Reply-To: <E1oAlzZ-002E5E-0L@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox