diff options
Diffstat (limited to 'src/include/utils/expandeddatum.h')
-rw-r--r-- | src/include/utils/expandeddatum.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/include/utils/expandeddatum.h b/src/include/utils/expandeddatum.h index ffdb0c45bd..c4818eb054 100644 --- a/src/include/utils/expandeddatum.h +++ b/src/include/utils/expandeddatum.h @@ -133,8 +133,17 @@ struct ExpandedObjectHeader * (More of these might be worth inlining later.) */ -#define EOHPGetRWDatum(eohptr) PointerGetDatum((eohptr)->eoh_rw_ptr) -#define EOHPGetRODatum(eohptr) PointerGetDatum((eohptr)->eoh_ro_ptr) +static inline Datum +EOHPGetRWDatum(const struct ExpandedObjectHeader *eohptr) +{ + return PointerGetDatum(eohptr->eoh_rw_ptr); +} + +static inline Datum +EOHPGetRODatum(const struct ExpandedObjectHeader *eohptr) +{ + return PointerGetDatum(eohptr->eoh_ro_ptr); +} /* Does the Datum represent a writable expanded object? */ #define DatumIsReadWriteExpandedObject(d, isnull, typlen) \ |