pgsql.hackers
[Top] [All Lists]

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

Subject: Re: Is it really such a good thing for newNode() to be a macro?
From: Tom Lane
Date: Wed, 27 Aug 2008 10:41:05 -0400
Newsgroups: pgsql.hackers

"Heikki Linnakangas" <heikki@xxxxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy