pgsql: Mark ItemPointer arguments as const in tuple/table lock function

Started by Peter Eisentraut10 months ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Mark ItemPointer arguments as const in tuple/table lock functions

The functions LockTuple, ConditionalLockTuple, UnlockTuple, and
XactLockTableWait take an ItemPointer argument that they do not
modify, so the argument can be const-qualified to better convey intent
and allow the compiler to enforce immutability.

Author: Chao Li <li.evan.chao@gmail.com>
Discussion: /messages/by-id/CAEoWx2m9e4rECHBwpRE4+GCH+pbYZXLh2f4rB1Du5hDfKug+Og@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/991295f387a6a453fe061831bcc36294989fe77b

Modified Files
--------------
src/backend/storage/lmgr/lmgr.c | 10 +++++-----
src/include/storage/lmgr.h | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)