Intentional usage of old style function declarations?

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Intentional usage of old style function declarations?
Date: 2015-08-11 16:55:08
Message-ID: 20150811165507.GC28835@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

We have a bunch of callbacks that use old-style C function
declarations. I.e. functions with empty parens allowing all types of
data being passed:

E.g.
extern bool expression_tree_walker(Node *node, bool (*walker) (),
void *context);
extern Node *expression_tree_mutator(Node *node, Node *(*mutator) (),
void *context);

I find that to be fairly ugly. Was that intentional? Fixing it would
imply adding a fair number of (Node *) casts as there's suddenly actual
parameter type checking done.

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-08-11 17:06:51 Re: WIP: SCRAM authentication
Previous Message David Fetter 2015-08-11 16:54:11 Re: [patch] A \pivot command for psql