Intentional usage of old style function declarations?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Intentional usage of old style function declarations?
Дата
Msg-id 20150811165507.GC28835@awork2.anarazel.de
обсуждение исходный текст
Ответы Re: Intentional usage of old style function declarations?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [patch] A \pivot command for psql
Следующее
От: Robert Haas
Дата:
Сообщение: Re: WIP: SCRAM authentication