Re: [PATCH v2] Add bit operations util header
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCH v2] Add bit operations util header |
| Дата | |
| Msg-id | 5714.1244044369@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [PATCH v2] Add bit operations util header (Florian Weimer <fweimer@bfk.de>) |
| Ответы |
Re: [PATCH v2] Add bit operations util header
|
| Список | pgsql-hackers |
Florian Weimer <fweimer@bfk.de> writes:
> * Jeremy Kerr:
>> Because now we have to test the compiler *and* the version as well?
> This builtin is not architecture-specific, so you'd save the
> architecture check.
The appropriate way to handle it would be a configure probe to see if
the function is available, thus avoiding any wired-in knowledge about
compiler or compiler version *or* architecture.
The other thing I didn't like about the patch was the assumption that
it's okay to have a "static inline" function in a header. You can
get away with that in gcc but *not* in other compilers. Look at the
existing coding patterns for, eg, list_head; then go thou and do
likewise. Or, since there's currently no need for the code outside
aset.c, forget about putting it in a header and just plop it into
aset.c.
regards, tom lane
В списке pgsql-hackers по дате отправления: