Re: Use C99 designated initializers for some structs

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Use C99 designated initializers for some structs
Дата
Msg-id df7e856a-3481-8ca2-2ee1-0b694af0c6d0@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Use C99 designated initializers for some structs  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 30/08/2018 22:14, Andres Freund wrote:
> I think we should have as rules:
> 
> 1) Members should be defined in the same order as in the struct, that's
>    the requirement C++ standard is going to impose. Think it's also
>    reasonable stylistically.
> 2) It's OK to omit setting members if zero-initialization obviously is
>    correct.

It seems like most people were OK with that, so I committed the patch.
This is something that we'll likely gain more experience with over time.

> We probably should also check how well pgindent copes, and whether that
> dictates some formatting choices.

The patch I submitted was run through pgindent.  I did not experience
any problem, and it didn't reformat anything about what I had originally
typed in (except one comment I think).

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Yugo Nagata
Дата:
Сообщение: Unused argument from execute_sql_string()
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: Refactor dlopen() support