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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Is it really such a good thing for newNode() to be a macro?
Date: 2008-08-27 14:41:05
Message-ID: 23533.1219848065@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Heikki Linnakangas" <heikki(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2008-08-27 14:54:08 Re: TODO <-> Commitfest
Previous Message Heikki Linnakangas 2008-08-27 14:32:13 Re: Is it really such a good thing for newNode() to be a macro?