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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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:

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.


Andres Freund


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