Intentional usage of old style function declarations? - Mailing list pgsql-hackers

From Andres Freund
Subject Intentional usage of old style function declarations?
Date
Msg-id 20150811165507.GC28835@awork2.anarazel.de
Whole thread Raw
Responses Re: Intentional usage of old style function declarations?
List 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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: [patch] A \pivot command for psql
Next
From: Robert Haas
Date:
Subject: Re: WIP: SCRAM authentication