Re: Is it really such a good thing for newNode() to be a macro?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is it really such a good thing for newNode() to be a macro?
Дата
Msg-id 23533.1219848065@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is it really such a good thing for newNode() to be a macro?  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Ответы Re: Is it really such a good thing for newNode() to be a macro?  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Список pgsql-hackers
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Well, we could still have the MemSetTest outside the function, and 
> evaluated at compile-time, if we provided an aligned and unaligned 
> version of newNode:

Yeah, that should work fine, since we expect MemSetTest to reduce to
a compile-time constant.  I'll have a go at this later ... unless
you want to do it?

I suppose it could cause funny behavior due to the size being
evaluated more than once, but the existing macro already does that
when Asserts are on, so in practice I don't see an objection there.
        regards, tom lane


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

Предыдущее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: Is it really such a good thing for newNode() to be a macro?
Следующее
От: "Brendan Jurd"
Дата:
Сообщение: Re: TODO <-> Commitfest