Convert macros to static inline functions

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Convert macros to static inline functions
Дата
Msg-id 5b558da8-99fb-0a99-83dd-f72f05388517@enterprisedb.com
обсуждение исходный текст
Ответы Re: Convert macros to static inline functions  (Amul Sul <sulamul@gmail.com>)
Re: Convert macros to static inline functions  (Peter Geoghegan <pg@bowt.ie>)
Re: Convert macros to static inline functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Inspired by [0], I looked to convert more macros to inline functions. 
The attached patches are organized "bottom up" in terms of their API 
layering; some of the later ones depend on some of the earlier ones.


Note 1: Some macros that do by-value assignments like

#define PageXLogRecPtrSet(ptr, lsn) \
  ((ptr).xlogid = (uint32) ((lsn) >> 32), (ptr).xrecoff = (uint32) (lsn))

can't be converted to functions without changing the API, so I left 
those alone for now.


Note 2: Many macros in htup_details.h operate both on HeapTupleHeader 
and on MinimalTuple, so converting them to a function doesn't work in a 
straightforward way.  I have some in-progress work in that area, but I 
have not included any of that here.


[0]: 
https://www.postgresql.org/message-id/202203241021.uts52sczx3al@alvherre.pgsql
Вложения

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

Предыдущее
От: torikoshia
Дата:
Сообщение: Re: RFC: Logging plan of the running query
Следующее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Skipping schema changes in publication