pgsql: Bring some MSVC asserts in line with other platforms

Поиск
Список
Период
Сортировка
От John Naylor
Тема pgsql: Bring some MSVC asserts in line with other platforms
Дата
Msg-id E1qQNka-0027Pv-2Y@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Bring some MSVC asserts in line with other platforms

MSVC's _BitScan* functions return a boolean indicating whether any
bits were set in the input, and we were previously asserting that
they returned true, per our API. This is correct. However, other
platforms simply assert that the input is non-zero, so do that to be
more consistent.

Noted while investigating a hypothesis from Ranier Vilela about
undefined behavior, but this is not his proposed patch.

Discussion:
https://www.postgresql.org/message-id/CAEudQAoDhUZyKGJ1vbMGcgVUOcsixe-%3DjcVaDWarqkUg163D2w%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39055cb4ccd5b521ceb802b6a8194de912a422cc

Modified Files
--------------
src/include/port/pg_bitutils.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add WAIT_EVENT_{CLASS,ID}_MASK in wait_event.c
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Support custom wait events for wait event type "Extension"