Re: [HACKERS] Add some const decorations to prototypes
От
Fabien COELHO
Тема
Re: [HACKERS] Add some const decorations to prototypes
Дата
Msg-id
alpine.DEB.2.20.1711101612370.668@lancre
Ответ на
Re: [HACKERS] Add some const decorations to prototypes (Peter Eisentraut)
Список
Дерево обсуждения
[HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Mark Dilger <hornschnorter@gmail.com>
Re: [HACKERS] Add some const decorations to prototypes Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] Add some const decorations to prototypes Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Add some const decorations to prototypes Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Add some const decorations to prototypes Fabien COELHO <coelho@cri.ensmp.fr>
Re: [HACKERS] Add some const decorations to prototypes Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Add some const decorations to prototypes Robert Haas <robertmhaas@gmail.com>
>> ISTM That there is still at least one strange cast: >> >> +static const char **LWLockTrancheArray = NULL; >> + LWLockTrancheArray = (const char **) // twice > > These are not cases of "cheating". This is just the return value of a > memory allocation function being cast from void * to the appropriate > result type. That is an orthogonal style decision that I have > maintained in these cases. Ok. I'm at the limit of my C abilities. Your answer is about void * vs char *, I'm okay with that. My question was about no const / const in the same operation. Would it make sense that the function returns "const void *", i.e. the cast is not on the const part but on the pointer type part? -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления
От: Mark Dilger
Дата: