Re: Fix casting away const in _bt_reorder_array_cmp
| От | Bertrand Drouvot |
|---|---|
| Тема | Re: Fix casting away const in _bt_reorder_array_cmp |
| Дата | |
| Msg-id | aVTmbGzc5GshObgP@ip-10-97-1-34.eu-west-3.compute.internal обсуждение исходный текст |
| Ответ на | Fix casting away const in _bt_reorder_array_cmp (Chao Li <li.evan.chao@gmail.com>) |
| Список | pgsql-hackers |
Hi, On Wed, Dec 31, 2025 at 03:51:55PM +0800, Chao Li wrote: > Hi Hackers, > > There have been several recent efforts to eliminate cast-away-const usages. > While reviewing another patch, I happened to notice one such occurrence, so > I’m posting a trivial patch to fix it. Thanks for the patch! This one is one that I choose to discard in [1] because this is just a thin wrapper. Not saying that keeping cast away const was a good thing but the idea was also to reduce the number of changes in the patch. The criteria was: " Indeed, I did some filtering and decided not to change the ones that: - are just thin wrappers - would require public API changes - rely on external functions (such as LZ4F_compressUpdate()) - would require changes beyond the scope of this cleanup" That said, also removing explicit casts when assigning from void pointers (relying on implicit conversion instead) is also valuable and your patch does exactly this. That could be part of a larger project though (as mentioned in [2]). Thoughts? [1]: https://www.postgresql.org/message-id/flat/aUQHy/MmWq7c97wK%40ip-10-97-1-34.eu-west-3.compute.internal [2]: https://www.postgresql.org/message-id/aVTiCHBalaFCneYD%40ip-10-97-1-34.eu-west-3.compute.internal Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: