From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: gratuitous casting away const
Date: Tue, 20 Sep 2016 16:06:59 -0400
Message-ID: <20919.1474402019@sss.pgh.pa.us> (raw)
In-Reply-To: <ACF3A030-E3D5-4E68-B744-184E11DE68F3@gmail.com>
References: <ACF3A030-E3D5-4E68-B744-184E11DE68F3@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, hornschnorter@gmail.com
Subject: Re: gratuitous casting away const
In-Reply-To: <20919.1474402019@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox