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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user