pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Reduce excessive dereferencing of function pointers
Date: Thu, 07 Sep 2017 17:59:05 +0000
Message-ID: <E1dq14z-0004vR-Kq@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Reduce excessive dereferencing of function pointers

It is equivalent in ANSI C to write (*funcptr) () and funcptr().  These
two styles have been applied inconsistently.  After discussion, we'll
use the more verbose style for plain function pointer variables, to make
it clear that it's a variable, and the shorter style when the function
pointer is in a struct (s.func() or s->func()), because then it's clear
that it's not a plain function name, and otherwise the excessive
punctuation makes some of those invocations hard to read.

Discussion: https://www.postgresql.org/message-id/f52c16db-14ed-757d-4b48-7ef360b1631d@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1356f78ea93395c107cbc75dc923e29a0efccd8a

Modified Files
--------------
contrib/btree_gist/btree_utils_num.c     | 34 ++++++-------
contrib/btree_gist/btree_utils_var.c     | 44 ++++++++---------
src/backend/access/transam/xact.c        |  4 +-
src/backend/commands/analyze.c           |  4 +-
src/backend/commands/portalcmds.c        |  2 +-
src/backend/commands/seclabel.c          |  2 +-
src/backend/executor/execCurrent.c       |  2 +-
src/backend/executor/execExprInterp.c    | 18 +++----
src/backend/executor/execMain.c          |  6 +--
src/backend/executor/execParallel.c      |  2 +-
src/backend/executor/execTuples.c        |  6 +--
src/backend/executor/execUtils.c         |  2 +-
src/backend/executor/functions.c         |  2 +-
src/backend/nodes/params.c               |  6 +--
src/backend/parser/parse_coerce.c        |  2 +-
src/backend/parser/parse_expr.c          | 10 ++--
src/backend/parser/parse_target.c        |  4 +-
src/backend/rewrite/rewriteManip.c       |  2 +-
src/backend/storage/ipc/ipc.c            | 12 ++---
src/backend/storage/smgr/smgr.c          | 44 ++++++++---------
src/backend/tcop/postgres.c              |  4 +-
src/backend/tcop/pquery.c                |  8 +--
src/backend/utils/adt/array_typanalyze.c |  2 +-
src/backend/utils/adt/expandeddatum.c    |  4 +-
src/backend/utils/adt/jsonfuncs.c        |  4 +-
src/backend/utils/cache/inval.c          |  8 +--
src/backend/utils/error/elog.c           |  4 +-
src/backend/utils/mb/mbutils.c           | 16 +++---
src/backend/utils/mb/wchar.c             | 12 ++---
src/backend/utils/misc/guc.c             | 60 +++++++++++------------
src/backend/utils/misc/timeout.c         |  2 +-
src/backend/utils/mmgr/README            |  2 +-
src/backend/utils/mmgr/mcxt.c            | 39 ++++++++-------
src/backend/utils/mmgr/portalmem.c       | 10 ++--
src/backend/utils/resowner/resowner.c    |  2 +-
src/bin/pg_dump/pg_backup_archiver.c     | 84 ++++++++++++++++----------------
src/bin/pg_dump/pg_backup_null.c         |  2 +-
src/bin/pg_dump/pg_backup_utils.c        |  4 +-
src/bin/psql/variables.c                 |  4 +-
src/include/executor/executor.h          |  4 +-
src/include/utils/selfuncs.h             |  2 +-
src/include/utils/sortsupport.h          |  4 +-
src/interfaces/libpq/fe-connect.c        |  4 +-
src/interfaces/libpq/fe-exec.c           |  2 +-
src/interfaces/libpq/fe-protocol2.c      |  2 +-
src/interfaces/libpq/fe-protocol3.c      |  2 +-
46 files changed, 249 insertions(+), 250 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dq14z-0004vR-Kq@gemulon.postgresql.org>
Permalink:  ../E1dq14z-0004vR-Kq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dq14z-0004vR-Kq@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 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: peter_e@gmx.net
  Subject: Re: pgsql: Reduce excessive dereferencing of function pointers
  In-Reply-To: <E1dq14z-0004vR-Kq@gemulon.postgresql.org>
  References: <E1dq14z-0004vR-Kq@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