Re: [HACKERS] Add some const decorations to prototypes

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Add some const decorations to prototypes
Дата
Msg-id 1ef5f6af-c4d8-c8ab-aeb8-584fa397c041@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
Список pgsql-hackers
On 10/31/17 10:56, Tom Lane wrote:
>> 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.

Would you prefer leaving the input argument as char *, or change the
endptr argument to const as well?

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


-- 
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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] ucs_wcwidth vintage
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] ucs_wcwidth vintage