From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify use of AllocSetContextCreate() wrapper macro.
Date: Fri, 12 Oct 2018 18:27:17 +0000
Message-ID: <E1gB29d-0005k7-Jd@gemulon.postgresql.org> (raw)
Simplify use of AllocSetContextCreate() wrapper macro.
We can allow this macro to accept either abbreviated or non-abbreviated
allocation parameters by making use of __VA_ARGS__. As noted by Andres
Freund, it's unlikely that any compiler would have __builtin_constant_p
but not __VA_ARGS__, so this gives up little or no error checking, and
it avoids a minor but annoying API break for extensions.
With this change, there is no reason for anybody to call
AllocSetContextCreateExtended directly, so in HEAD I renamed it to
AllocSetContextCreateInternal. It's probably too late for an ABI
break like that in 11, though.
Discussion: https://postgr.es/m/20181012170355.bhxi273skjt6sag4@alap3.anarazel.de
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3d059655be7dfcb7124c6b3ce0925448de89f669
Modified Files
--------------
src/backend/access/transam/xact.c | 10 +++++-----
src/backend/utils/mmgr/aset.c | 6 ++++--
src/backend/utils/mmgr/mcxt.c | 10 +++++-----
src/include/utils/memutils.h | 13 ++++++-------
4 files changed, 20 insertions(+), 19 deletions(-)
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
Subject: Re: pgsql: Simplify use of AllocSetContextCreate() wrapper macro.
In-Reply-To: <E1gB29d-0005k7-Jd@gemulon.postgresql.org>
References: <E1gB29d-0005k7-Jd@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