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

Commit c07afbe

Browse files
author
Nikita Glukhov
committed
Mark some jsonpath functions as inline
1 parent c5bae2a commit c07afbe

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
@@ -39,7 +39,7 @@ typedef struct JsonValueListIterator
3939

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

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

@@ -293,7 +293,7 @@ computeJsonPathItem(JsonPathExecContext *cxt, JsonPathItem *item, JsonbValue *va
293293
* as alias to jbvBinary
294294
*/
295295
#define jbvScalar jbvBinary
296-
static int
296+
static inline int
297297
JsonbType(JsonbValue *jb)
298298
{
299299
int type = jb->type;
@@ -513,7 +513,7 @@ compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2, bool *error)
513513
return DatumGetInt32(DirectFunctionCall2(cmpfunc, val1, val2));
514514
}
515515

516-
static JsonPathExecResult
516+
static inline JsonPathExecResult
517517
checkEquality(JsonbValue *jb1, JsonbValue *jb2, bool not)
518518
{
519519
bool eq = false;
@@ -1947,7 +1947,7 @@ recursiveExecuteUnwrap(JsonPathExecContext *cxt, JsonPathItem *jsp,
19471947
* Wrap a non-array SQL/JSON item into an array for applying array subscription
19481948
* path steps in lax mode.
19491949
*/
1950-
static JsonbValue *
1950+
static inline JsonbValue *
19511951
wrapItem(JsonbValue *jbv)
19521952
{
19531953
JsonbParseState *ps = NULL;
@@ -1985,12 +1985,10 @@ wrapItem(JsonbValue *jbv)
19851985
return JsonbWrapInBinary(jbv, NULL);
19861986
}
19871987

1988-
static JsonPathExecResult
1988+
static inline JsonPathExecResult
19891989
recursiveExecute(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb,
19901990
JsonValueList *found)
19911991
{
1992-
check_stack_depth();
1993-
19941992
if (cxt->lax)
19951993
{
19961994
switch (jsp->type)

0 commit comments

Comments
 (0)