Modernize const handling with readline
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-10-03T10:23:12Z
Lists: pgsql-hackers
Attachments
- 0001-Modernize-const-handling-with-readline.patch (text/plain) patch 0001
The comment
/* On some platforms, readline is declared as readline(char *) */
is obsolete. The casting away of const can be removed.
The const in the readline() prototype was added in GNU readline 4.2,
released in 2001. BSD libedit has also had const in the prototype since
at least 2001.
(The commit that introduced this comment (187e865174) talked about
FreeBSD 4.8, which didn't have readline compatibility in libedit yet, so
it must have been talking about GNU readline in the base system. This
checks out, but already FreeBSD 5 had an updated GNU readline with const.)
Commits
-
Add const qualifiers to XLogRegister*() functions
- 2b5f57977f6d 18.0 landed
-
Constify crc32_sz
- 688926633fc6 17.0 landed
-
Modernize const handling with readline
- 8666cf65ea69 17.0 landed