Marko Kreen <markokr(at)gmail(dot)com> writes:
> On 12/15/09, Kurt Harriman <harriman(at)acm(dot)org> wrote:
>> Attached is a revised patch, offered for the 2010-01 commitfest.
>> It's also available in my git repository in the "submitted" branch:
> -1. The PG_INLINE is ugly.
FWIW, I think the patch is largely OK, except for the autoconf hackery
which I'm not the best-qualified person to opine on. I would only
suggest that the cleanest coding would be
static inline foo(...) ...
... non-inline definition of foo
ie, go ahead and rely on autoconf's definition (if any) of "inline"
and add a policy symbol USE_INLINE to determine whether to use it.
The proposed PG_INLINE coding conflates the symbol needed in the code
with the policy choice.
Another possibility would be to call the policy symbol HAVE_INLINE,
but that (a) risks collision with a name defined by autoconf built-in
macros, and (b) looks like it merely indicates whether the compiler
*has* inline, not that we have made a choice about how to use it.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Marko Kreen||Date: 2009-12-16 16:24:34|
|Subject: Re: Patch: Remove gcc dependency in definition of inline functions|
|Previous:||From: Scott Bailey||Date: 2009-12-16 16:10:57|
|Subject: Re: idea - new aggregates median, listagg|