Re: gratuitous casting away const

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: gratuitous casting away const
Дата
Msg-id 20919.1474402019@sss.pgh.pa.us
обсуждение исходный текст
Ответ на gratuitous casting away const  (Mark Dilger <hornschnorter@gmail.com>)
Ответы Re: gratuitous casting away const  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> Would patches to not cast away const be considered?

In general, yes, but I'm not especially in favor of something like this:

>  bool
>  PageIndexTupleOverwrite(Page page, OffsetNumber offnum,
> -                                               Item newtup, Size newsize)
> +                                               const char *newtup, Size newsize)
>  {

since that seems to be discarding type information in order to add
"const"; does not seem like a net benefit from here.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: increasing the default WAL segment size
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Rename max_parallel_degree?