Re: Modernize const handling with readline

2023-10-04 Thread Peter Eisentraut
On 04.10.23 17:09, Aleksander Alekseev wrote: Hi, On 03.10.23 13:28, Aleksander Alekseev wrote: While examining the code for similar places I noticed that the following functions can also be const'ified: - crc32_sz I suppose this could be changed. OK, that's a simple change. Here is the p

Re: Modernize const handling with readline

2023-10-04 Thread Aleksander Alekseev
Hi, > On 03.10.23 13:28, Aleksander Alekseev wrote: > > While examining the code for similar places I noticed that the > > following functions can also be const'ified: > > > > - crc32_sz > > I suppose this could be changed. OK, that's a simple change. Here is the patch. -- Best regards, Aleksan

Re: Modernize const handling with readline

2023-10-04 Thread Peter Eisentraut
On 03.10.23 13:28, Aleksander Alekseev wrote: While examining the code for similar places I noticed that the following functions can also be const'ified: - crc32_sz I suppose this could be changed. - pg_checksum_page (? temporary modifies the page but then restores it) Then it's not really

Re: Modernize const handling with readline

2023-10-03 Thread Tom Lane
Peter Eisentraut writes: > The comment > /* On some platforms, readline is declared as readline(char *) */ > is obsolete. The casting away of const can be removed. +1, that's surely not of interest on anything we still support. regards, tom lane

Re: Modernize const handling with readline

2023-10-03 Thread Aleksander Alekseev
Hi, > 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 sin

Modernize const handling with readline

2023-10-03 Thread Peter Eisentraut
From 4db9b54b40833486e366c2d117291147ce47b195 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 3 Oct 2023 12:08:25 +0200 Subject: [PATCH] Modernize const handling with readline The comment /* On some platforms, readline is declared as readline(char *) */ is obsolete. The casting aw