Re: [HACKERS] Size vs size_t

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [HACKERS] Size vs size_t
Дата
Msg-id D8C0749C-54B4-4503-AAF8-53059C3E624F@yesql.se
обсуждение исходный текст
Ответ на Re: [HACKERS] Size vs size_t  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> On 16 Mar 2017, at 23:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
>> Naive replacement in new files (present in master but not in 9.6) with
>> the attached script, followed by a couple of manual corrections where
>> Size was really an English word in a comment, gets the attached diff.
>
> In the case of mmgr/slab.c, a lot of those uses of Size probably
> correspond to instantiations of the MemoryContext APIs; so blindly
> changing them to "size_t" seems like a bit of a type violation
> (and might indeed draw warnings from pickier compilers).  Don't
> know if any of the other things you've identified here have similar
> entanglements.

While it might not be an issue that hits many developers, Size is also defined
on macOS in the MacTypes.h header so using CoreFoundation when hacking on macOS
port code will cause typedef redefinition errors.

Not really a case for or against, but another datapoint.

cheers ./daniel


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

Предыдущее
От: Vitaly Burovoy
Дата:
Сообщение: Re: [HACKERS] identity columns
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: [HACKERS] Re: [COMMITTERS] pgsql: Add TAP tests for password-basedauthentication methods.