Re: Note about include files

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Note about include files
Дата
Msg-id 4558.970497903@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Note about include files  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On a related note, does anyone know why the on_proc_exit and on_shmem_exit
> hooks use a second argument of type `caddr_t' rather than, say, void*,
> char*, Datum, ...?  This artifact is the cause of about two thirds of the
> compile errors in the pedantic setting.

I was annoyed by that just the other day on an Alpha box (it provokes
lots of "integer cast to pointer of different size" warnings there).
I'm sure the use of caddr_t is strictly historical.

If you feel like doing something about it, changing the arguments of
these routines to be Datum and then adding the necessary
to-and-from-Datum macros seems like the obvious solution path.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: failed assertion error on PG-7.0.2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq PGHOST