mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -42,13 +42,14 @@
|
||||
* was used to upgrade from an older version, tuples might still have an
|
||||
* oid. Seems worthwhile to display that.
|
||||
*/
|
||||
#define HeapTupleHeaderGetOidOld(tup) \
|
||||
( \
|
||||
((tup)->t_infomask & HEAP_HASOID_OLD) ? \
|
||||
*((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) \
|
||||
: \
|
||||
InvalidOid \
|
||||
)
|
||||
static inline Oid
|
||||
HeapTupleHeaderGetOidOld(const HeapTupleHeaderData *tup)
|
||||
{
|
||||
if (tup->t_infomask & HEAP_HASOID_OLD)
|
||||
return *((Oid *) ((char *) (tup) + (tup)->t_hoff - sizeof(Oid)));
|
||||
else
|
||||
return InvalidOid;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user