Re: gratuitous casting away const

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gratuitous casting away const
Date: 2016-09-20 20:06:59
Message-ID: 20919.1474402019@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <hornschnorter(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-20 20:07:39 Re: Rename max_parallel_degree?
Previous Message Robert Haas 2016-09-20 20:05:44 Re: increasing the default WAL segment size