From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Extend PageIsVerified() to handle more custom options
Date: Mon, 26 Oct 2020 21:29:46 -0400
Message-ID: <913282.1603762186@sss.pgh.pa.us> (raw)
In-Reply-To: <20201027001801.GA28445@paquier.xyz>
References: <E1kWqx0-0005Rk-TO@gemulon.postgresql.org>
<20201026143933.GA5304@alvherre.pgsql>
<20201027001801.GA28445@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Oct 26, 2020 at 11:39:33AM -0300, Alvaro Herrera wrote:
>> Please remember that in the macro definition, the arguments should be
>> enclosed in parens. No bug here at present, but it seems better to be
>> cautious.
> Indeed, I can see similar changes in the history of the tree. Do you
> think that doing something like the attached is sufficient?
Hm, I suspect what Alvaro meant was
#define PageIsVerified(page, blkno) \
- PageIsVerifiedExtended(page, blkno, \
+ PageIsVerifiedExtended((page), (blkno), \
But IMV that's not necessary: if the argument parsed as a single
function/macro argument before, it still will do so. The places
where you have to be careful to add parentheses are where the
macro argument is used as part of a larger expression that is
not just a function/macro argument.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Extend PageIsVerified() to handle more custom options
In-Reply-To: <913282.1603762186@sss.pgh.pa.us>
References: <E1kWqx0-0005Rk-TO@gemulon.postgresql.org> <20201026143933.GA5304@alvherre.pgsql> <20201027001801.GA28445@paquier.xyz> <913282.1603762186@sss.pgh.pa.us>
* 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