]> granicus.if.org Git - postgresql/commit
Reduce excessive dereferencing of function pointers
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 7 Sep 2017 16:06:23 +0000 (12:06 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 7 Sep 2017 17:56:09 +0000 (13:56 -0400)
commit1356f78ea93395c107cbc75dc923e29a0efccd8a
treea06cc9e40efdf8382692fb79b5b22c3920f93b5f
parent9d71323daca412e6e175595e1e42809fb5e1172d
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
46 files changed:
contrib/btree_gist/btree_utils_num.c
contrib/btree_gist/btree_utils_var.c
src/backend/access/transam/xact.c
src/backend/commands/analyze.c
src/backend/commands/portalcmds.c
src/backend/commands/seclabel.c
src/backend/executor/execCurrent.c
src/backend/executor/execExprInterp.c
src/backend/executor/execMain.c
src/backend/executor/execParallel.c
src/backend/executor/execTuples.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/nodes/params.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_target.c
src/backend/rewrite/rewriteManip.c
src/backend/storage/ipc/ipc.c
src/backend/storage/smgr/smgr.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/utils/adt/array_typanalyze.c
src/backend/utils/adt/expandeddatum.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/cache/inval.c
src/backend/utils/error/elog.c
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/wchar.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/timeout.c
src/backend/utils/mmgr/README
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/resowner/resowner.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_null.c
src/bin/pg_dump/pg_backup_utils.c
src/bin/psql/variables.c
src/include/executor/executor.h
src/include/utils/selfuncs.h
src/include/utils/sortsupport.h
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c