Re: [PATCH 04/16] Add embedded list interface (header only)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH 04/16] Add embedded list interface (header only)
Дата
Msg-id 29283.1340654365@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH 04/16] Add embedded list interface (header only)  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: [PATCH 04/16] Add embedded list interface (header only)  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On Monday, June 25, 2012 05:57:51 PM Tom Lane wrote:
>> Well, my response is "no".  I could see saying that we require (some) C99
>> features at this point, but not features that are in no standard, no
>> matter how popular gcc might be.

> Also, 'static inline' *is* C99 conforming as far as I can see?

Hmm.  I went back and re-read the C99 spec, and it looks like most of
the headaches we had in the past with C99 inline are specific to the
case where you want an extern declaration to be available.  For a
function that exists *only* as a static it might be all right.  So maybe
I'm misremembering how well this would work.  We'd have to be sure we
don't need any extern declarations, though.

Having said that, I'm still of the opinion that it's not so hard to deal
with that we should just blow off compilers where "inline" doesn't work
well.  I have no sympathy at all for the "we'd need two copies"
argument.  First off, if the code is at any risk whatsoever of changing
intra-major-release, it is not acceptable to inline it (there would be
inline copies in third-party modules where we couldn't ensure
recompilation).  So that's going to force us to use this only in cases
where the code is small and stable enough that two copies aren't such
a big problem.  Second, it's not that hard to set things up so there's
only one source-code copy, as was noted upthread.
        regards, tom lane


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

Предыдущее
От: Phil Sorber
Дата:
Сообщение: Re: libpq compression
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Catalog/Metadata consistency during changeset extraction from wal