Re: datum passed to macro which expects a pointer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: datum passed to macro which expects a pointer
Дата
Msg-id 25542.1208037759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на datum passed to macro which expects a pointer  (Gavin Sherry <swm@alcove.com.au>)
Ответы Re: datum passed to macro which expects a pointer  (Gavin Sherry <swm@alcove.com.au>)
Список pgsql-patches
Gavin Sherry <swm@alcove.com.au> writes:
> This may seem a little pedantic but I noticed a few places where we pass
> a datum to a macro which treats the datum as a pointer. This works now
> but might not in the future (if, say, Datum were to be 8 bytes).

Yeah, definitely something to fix.  I think though that the cases
like this:

> !     PG_RETURN_TEXT_P(DatumGetPointer(result));

might as well just use PG_RETURN_DATUM instead of casting twice.

Was this just eyeball inspection or did you find a compiler that would
complain about this?

            regards, tom lane

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

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: datum passed to macro which expects a pointer
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: datum passed to macro which expects a pointer