summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-10-30 09:38:52 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-10-30 10:13:47 +0100
commit3479a0f823d5a6c3ec61dff6b11ea5250389e56a (patch)
tree9d5ea0884cbb6a44baa8fff8cf65468191c9129b /src/backend
parente2cf524e4ad8a8667033628ca106fb7c9ebcd207 (diff)
const-qualify ItemPointer comparison functions
Add const qualifiers to ItemPointerEquals() and ItemPointerCompare(). This will allow further changes up the stack. It also complements commit aeb767ca0b0, as we now have all of itemptr.h appropriately const-qualified. Author: Chao Li <li.evan.chao@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2nBaypg16Z5ciHuKw66pk850RFWw9ACS2DqqJ_AkKeRsw@mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/storage/page/itemptr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/page/itemptr.c b/src/backend/storage/page/itemptr.c
index ad658215721..cedb27d6cc5 100644
--- a/src/backend/storage/page/itemptr.c
+++ b/src/backend/storage/page/itemptr.c
@@ -32,7 +32,7 @@ StaticAssertDecl(sizeof(ItemPointerData) == 3 * sizeof(uint16),
* Asserts that the disk item pointers are both valid!
*/
bool
-ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2)
+ItemPointerEquals(const ItemPointerData *pointer1, const ItemPointerData *pointer2)
{
if (ItemPointerGetBlockNumber(pointer1) ==
ItemPointerGetBlockNumber(pointer2) &&
@@ -48,7 +48,7 @@ ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2)
* Generic btree-style comparison for item pointers.
*/
int32
-ItemPointerCompare(ItemPointer arg1, ItemPointer arg2)
+ItemPointerCompare(const ItemPointerData *arg1, const ItemPointerData *arg2)
{
/*
* Use ItemPointerGet{Offset,Block}NumberNoCheck to avoid asserting