pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Simplify use of AllocSetContextCreate() wrapper macro.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Simplify use of AllocSetContextCreate() wrapper macro.
@ 2018-10-12 18:27 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-10-12 18:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/13cd7209f794d9dff8084c9748a78a0a5bf0464a

Modified Files
--------------
src/backend/access/transam/xact.c | 10 +++++-----
src/backend/utils/mmgr/aset.c     | 10 ++++++----
src/backend/utils/mmgr/mcxt.c     | 10 +++++-----
src/include/utils/memutils.h      | 13 ++++++-------
4 files changed, 22 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Simplify use of AllocSetContextCreate() wrapper macro.
@ 2018-10-12 18:27 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-10-12 18:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-10-12 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 18:27 pgsql: Simplify use of AllocSetContextCreate() wrapper macro. Tom Lane <tgl@sss.pgh.pa.us>
2018-10-12 18:27 pgsql: Simplify use of AllocSetContextCreate() wrapper macro. Tom Lane <tgl@sss.pgh.pa.us>

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