Skip to content

Commit 40b1db5

Browse files
author
Marina Polyakova
committed
Fix build due to new checks in PostgreSQL 16
The macro PG_DETOAST_DATUM returns a pointer to a varlena structure and the input to the function DatumGetPointer must be of type Datum (see the commit c8b2ef05f481ef06326d7b9f3eb14b303f215c7e in PostgreSQL 16). So use a simple cast instead of the function DatumGetPointer.
1 parent cdcfd38 commit 40b1db5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: jsquery.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef struct
2626
int32 vl_len_; /* varlena header (do not touch directly!) */
2727
} JsQuery;
2828

29-
#define DatumGetJsQueryP(d) ((JsQuery*)DatumGetPointer(PG_DETOAST_DATUM(d)))
29+
#define DatumGetJsQueryP(d) ((JsQuery*) PG_DETOAST_DATUM(d))
3030
#define PG_GETARG_JSQUERY(x) DatumGetJsQueryP(PG_GETARG_DATUM(x))
3131
#define PG_RETURN_JSQUERY(p) PG_RETURN_POINTER(p)
3232

0 commit comments

Comments
 (0)