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-7ef360b16...@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