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

Commit 9843bef

Browse files
author
Nikita Glukhov
committed
Mark some jsonpath functions as inline
1 parent 3d7e41d commit 9843bef

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;
@@ -1954,7 +1954,7 @@ recursiveExecuteUnwrap(JsonPathExecContext *cxt, JsonPathItem *jsp,
19541954
return recursiveExecuteNoUnwrap(cxt, jsp, jb, found);
19551955
}
19561956

1957-
static JsonbValue *
1957+
static inline JsonbValue *
19581958
wrapItem(JsonbValue *jbv)
19591959
{
19601960
JsonbParseState *ps = NULL;
@@ -1982,12 +1982,10 @@ wrapItem(JsonbValue *jbv)
19821982
return jbv;
19831983
}
19841984

1985-
static JsonPathExecResult
1985+
static inline JsonPathExecResult
19861986
recursiveExecute(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb,
19871987
JsonValueList *found)
19881988
{
1989-
check_stack_depth();
1990-
19911989
if (cxt->lax)
19921990
{
19931991
switch (jsp->type)

0 commit comments

Comments
 (0)