File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -156,14 +156,16 @@ typedef struct Json
156
156
#undef PG_GETARG_JSONB
157
157
#define PG_GETARG_JSONB (n ) PG_GETARG_JSONX_TMP(n, alloca(sizeof(Json))) /* FIXME conditional alloca() */
158
158
159
- #define PG_FREE_IF_COPY_JSONB (json , n ) \
160
- do { \
161
- if (!VARATT_IS_EXTERNAL_EXPANDED(PG_GETARG_POINTER(n ))) \
162
- JsonFree(json); \
163
- else \
164
- Assert(DatumGetEOHP(PG_GETARG_DATUM(n) ) == &(json)->obj.eoh); \
165
- } while (0)
159
+ #define JsonFreeIfCopy (json , datum ) \
160
+ do { \
161
+ if (!VARATT_IS_EXTERNAL_EXPANDED(DatumGetPointer(datum ))) \
162
+ JsonFree(json); \
163
+ else \
164
+ Assert(DatumGetEOHP(datum ) == &(json)->obj.eoh); \
165
+ } while (0)
166
166
167
+ #define PG_FREE_IF_COPY_JSONB (json , n ) \
168
+ JsonFreeIfCopy(json, PG_GETARG_DATUM(n))
167
169
168
170
#define JsonRoot (json ) (&(json)->root)
169
171
#define JsonGetSize (json ) (JsonRoot(json)->len)
You can’t perform that action at this time.
0 commit comments