Re: plenty code is confused about function level static

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: plenty code is confused about function level static
Дата
Msg-id 20240418171602.l43glna5ywqpfrez@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: plenty code is confused about function level static  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: plenty code is confused about function level static  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
Hi,

On 2024-04-18 09:07:43 -0300, Ranier Vilela wrote:
>  On 18/04/2024 00:39, Andres Freund wrote:
> >There are lots of places that could benefit from adding 'static
> >const'.
> 
> I found a few more places.

Good catches.


> Patch 004
> 
> The opposite would also help, adding static.
> In these places, I believe it is safe to add static,
> allowing the compiler to transform into read-only, definitively.

I don't think this would even compile? E.g. LockTagTypeNames, pg_wchar_table
are declared in a header and used across translation units.

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: plenty code is confused about function level static
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: plenty code is confused about function level static