1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-01 21:31:19 +03:00

Convert macros to static inline functions (htup_details.h, itup.h)

Discussion: https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517@enterprisedb.com
This commit is contained in:
Peter Eisentraut
2025-01-23 12:07:38 +01:00
parent b15b8c5cf8
commit 34694ec888
3 changed files with 351 additions and 225 deletions

View File

@@ -68,9 +68,23 @@ typedef IndexAttributeBitMapData * IndexAttributeBitMap;
#define INDEX_VAR_MASK 0x4000
#define INDEX_NULL_MASK 0x8000
#define IndexTupleSize(itup) ((Size) ((itup)->t_info & INDEX_SIZE_MASK))
#define IndexTupleHasNulls(itup) ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK))
#define IndexTupleHasVarwidths(itup) ((((IndexTuple) (itup))->t_info & INDEX_VAR_MASK))
static inline Size
IndexTupleSize(const IndexTupleData *itup)
{
return (itup->t_info & INDEX_SIZE_MASK);
}
static inline bool
IndexTupleHasNulls(const IndexTupleData *itup)
{
return itup->t_info & INDEX_NULL_MASK;
}
static inline bool
IndexTupleHasVarwidths(const IndexTupleData *itup)
{
return itup->t_info & INDEX_VAR_MASK;
}
/* routines in indextuple.c */