Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e11667a

Browse files
author
Nikita Glukhov
committed
Mark some jsonpath functions as inline
1 parent 4a3e826 commit e11667a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/backend/utils/adt/jsonpath_exec.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef struct JsonValueListIterator
3838

3939
#define JsonValueListIteratorEnd ((ListCell *) -1)
4040

41-
static JsonPathExecResult recursiveExecute(JsonPathExecContext *cxt,
41+
static inline JsonPathExecResult recursiveExecute(JsonPathExecContext *cxt,
4242
JsonPathItem *jsp, JsonbValue *jb,
4343
JsonValueList *found);
4444

@@ -304,7 +304,7 @@ computeJsonPathItem(JsonPathExecContext *cxt, JsonPathItem *item, JsonbValue *va
304304
* as alias to jbvBinary
305305
*/
306306
#define jbvScalar jbvBinary
307-
static int
307+
static inline int
308308
JsonbType(JsonbValue *jb)
309309
{
310310
int type = jb->type;
@@ -524,7 +524,7 @@ compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2, bool *error)
524524
return DatumGetInt32(DirectFunctionCall2(cmpfunc, val1, val2));
525525
}
526526

527-
static JsonPathExecResult
527+
static inline JsonPathExecResult
528528
checkEquality(JsonbValue *jb1, JsonbValue *jb2, bool not)
529529
{
530530
bool eq = false;
@@ -1958,7 +1958,7 @@ recursiveExecuteUnwrap(JsonPathExecContext *cxt, JsonPathItem *jsp,
19581958
* Wrap a non-array SQL/JSON item into an array for applying array subscription
19591959
* path steps in lax mode.
19601960
*/
1961-
static JsonbValue *
1961+
static inline JsonbValue *
19621962
wrapItem(JsonbValue *jbv)
19631963
{
19641964
JsonbParseState *ps = NULL;
@@ -2004,12 +2004,10 @@ wrapItem(JsonbValue *jbv)
20042004
return jbv;
20052005
}
20062006

2007-
static JsonPathExecResult
2007+
static inline JsonPathExecResult
20082008
recursiveExecute(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb,
20092009
JsonValueList *found)
20102010
{
2011-
check_stack_depth();
2012-
20132011
if (cxt->lax)
20142012
{
20152013
switch (jsp->type)

0 commit comments

Comments
 (0)