Skip to content

Commit 34694ec

Browse files
committed
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
1 parent b15b8c5 commit 34694ec

File tree

3 files changed

+352
-226
lines changed

3 files changed

+352
-226
lines changed

contrib/pageinspect/heapfuncs.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@
4242
* was used to upgrade from an older version, tuples might still have an
4343
* oid. Seems worthwhile to display that.
4444
*/
45-
#define HeapTupleHeaderGetOidOld(tup) \
46-
( \
47-
((tup)->t_infomask & HEAP_HASOID_OLD) ? \
48-
*((Oid *) ((char *)(tup) + (tup)->t_hoff - sizeof(Oid))) \
49-
: \
50-
InvalidOid \
51-
)
45+
static inline Oid
46+
HeapTupleHeaderGetOidOld(const HeapTupleHeaderData *tup)
47+
{
48+
if (tup->t_infomask & HEAP_HASOID_OLD)
49+
return *((Oid *) ((char *) (tup) + (tup)->t_hoff - sizeof(Oid)));
50+
else
51+
return InvalidOid;
52+
}
5253

5354

5455
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy