diff options
| author | Peter Eisentraut | 2017-09-07 16:06:23 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-09-07 17:56:09 +0000 |
| commit | 1356f78ea93395c107cbc75dc923e29a0efccd8a (patch) | |
| tree | a06cc9e40efdf8382692fb79b5b22c3920f93b5f /src/backend/executor/execTuples.c | |
| parent | 9d71323daca412e6e175595e1e42809fb5e1172d (diff) | |
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/[email protected]
Diffstat (limited to 'src/backend/executor/execTuples.c')
| -rw-r--r-- | src/backend/executor/execTuples.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 31f814c0f07..51d2c5d166d 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -1241,7 +1241,7 @@ begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc) tstate->slot = MakeSingleTupleTableSlot(tupdesc); tstate->dest = dest; - (*tstate->dest->rStartup) (tstate->dest, (int) CMD_SELECT, tupdesc); + tstate->dest->rStartup(tstate->dest, (int) CMD_SELECT, tupdesc); return tstate; } @@ -1266,7 +1266,7 @@ do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull) ExecStoreVirtualTuple(slot); /* send the tuple to the receiver */ - (void) (*tstate->dest->receiveSlot) (slot, tstate->dest); + (void) tstate->dest->receiveSlot(slot, tstate->dest); /* clean up */ ExecClearTuple(slot); @@ -1310,7 +1310,7 @@ do_text_output_multiline(TupOutputState *tstate, const char *txt) void end_tup_output(TupOutputState *tstate) { - (*tstate->dest->rShutdown) (tstate->dest); + tstate->dest->rShutdown(tstate->dest); /* note that destroying the dest is not ours to do */ ExecDropSingleTupleTableSlot(tstate->slot); pfree(tstate); |
