From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Extend PageIsVerified() to handle more custom options |
Date: | 2020-10-27 01:29:46 |
Message-ID: | 913282.1603762186@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Michael Paquier <michael(at)paquier(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-10-27 02:12:39 | Re: pgsql: Extend PageIsVerified() to handle more custom options |
Previous Message | Michael Paquier | 2020-10-27 00:18:01 | Re: pgsql: Extend PageIsVerified() to handle more custom options |