Re: Is it really such a good thing for newNode() to be a macro? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is it really such a good thing for newNode() to be a macro?
Date
Msg-id 23533.1219848065@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is it really such a good thing for newNode() to be a macro?  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: Is it really such a good thing for newNode() to be a macro?  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List 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 by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: Is it really such a good thing for newNode() to be a macro?
Next
From: "Brendan Jurd"
Date:
Subject: Re: TODO <-> Commitfest