Re: [HACKERS] Add some const decorations to prototypes
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Add some const decorations to prototypes |
| Дата | |
| Msg-id | 20359.1509461767@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | [HACKERS] Add some const decorations to prototypes (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
| Ответы |
Re: [HACKERS] Add some const decorations to prototypes
Re: [HACKERS] Add some const decorations to prototypes |
| Список | pgsql-hackers |
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Here is a patch that adds const decorations to many char * arguments in
> functions. It should have no impact otherwise; there are very few code
> changes caused by it.
+1 in general ...
> Some functions have a strtol()-like behavior
> where they take in a const char * and return a pointer into that as
> another argument. In those cases, I added a cast or two.
... but I'm not sure that it's an improvement in cases where you have to
cast away the const somewhere else. I realize that strtol has an ancient
pedigree, but I do not think it's very good design.
regards, tom lane
--
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 по дате отправления: