Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE3WP-00067i-Qc for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Jan 2023 07:21:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pE3WO-0002d1-4J for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Jan 2023 07:21:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE3WN-0002cr-QP for pgsql-hackers@lists.postgresql.org; Sat, 07 Jan 2023 07:21:39 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE3WF-0006D2-Pp for pgsql-hackers@lists.postgresql.org; Sat, 07 Jan 2023 07:21:38 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id BBD72580B0B; Sat, 7 Jan 2023 02:21:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 07 Jan 2023 02:21:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1673076089; x= 1673083289; bh=14HJUa4VNUQRlXqkEe5IE+XcR0xks+sp7mEE0NNWWMU=; b=c EOK9YJuuchOQi8rTMBokRMHG4+lS1yhLCzcglCdu8yqgBY3Dhj4lh3YJ47OcasZf 5XwGu+UDTaH5rR3GgKPFT4A7sjNtugP8fZ0zk3XUTh9aXkL9spuyMl1w2E8LXqPN j4kvoZI5BN1eosmXiWkp5nOOWuKHLNpx+Cx97ksNDp9dVkKBie+Zwk7ySr3iMBTw N6Amh1gJ1R+CIODaeb9amGEVQhf9RiVi8x9DIgL6VEJnBlhIaNYKb3leEK4i8KQR l2aXS+0G08dvI0p9+YRASSMHiGWEJlLGRYqVRjivjtOicu7WR+lzCf7hK3hv/mwE tO+ybaRDYXbSWLlv4yWNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrkedugddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Jan 2023 02:21:27 -0500 (EST) Message-ID: <8935187f-0312-afd6-142a-f48142178dcb@enterprisedb.com> Date: Sat, 7 Jan 2023 08:21:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] Const'ify the arguments of ilist.c/ilist.h functions Content-Language: en-US To: Aleksander Alekseev , PostgreSQL Hackers Cc: Andres Freund , Bharath Rupireddy , David Rowley References: <20221122173156.6ye6xpcsrxok6ela@awork3.anarazel.de> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23.11.22 14:57, Aleksander Alekseev wrote: > Hi Andres, > > Thanks for the review! > >> I don't think it is correct for any of these to add const. The only reason it >> works is because of casting etc. > > Fair enough. PFA the corrected patch v2. This patch version looks correct to me. It is almost the same as the one that Andres had posted in his thread, except that yours also modifies slist_delete() and dlist_member_check(). Both of these changes also look correct to me.