Fix PG_GETARG_SEG_P() definition.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Nov 2019 15:57:49 +0000 (10:57 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Nov 2019 15:57:49 +0000 (10:57 -0500)
DatumGetPointer() takes a Datum argument, not a pointer.
This is cosmetic given the current definitions of the
underlying macros, but it's still formally a type violation.

Bug was introduced in commit 389bb2818, but there seems
no need to back-patch.

Dagfinn Ilmari MannsÃ¥ker

Discussion: https://postgr.es/m/d8jlfsxq3a0.fsf@dalvik.ping.uio.no

contrib/seg/seg.c

index 4e34fba7c7bc5d3db594ce3492b83c55149dce26..f87456405c332adab3aea0efe578788e9f07d01f 100644 (file)
@@ -19,7 +19,7 @@
 
 
 #define DatumGetSegP(X) ((SEG *) DatumGetPointer(X))
-#define PG_GETARG_SEG_P(n) DatumGetSegP(PG_GETARG_POINTER(n))
+#define PG_GETARG_SEG_P(n) DatumGetSegP(PG_GETARG_DATUM(n))
 
 
 /*