77#include "miscadmin.h"
88#include "jsquery.h"
99
10- static ExtractedNode * recursiveExtract (JsQueryItemR * jsq , bool indirect , PathItem * path );
10+ static ExtractedNode * recursiveExtract (JsQueryItem * jsq , bool indirect , PathItem * path );
1111static int coundChildren (ExtractedNode * node , ExtractedNodeType type , bool first , bool * found );
1212static void fillChildren (ExtractedNode * node , ExtractedNodeType type , bool first , ExtractedNode * * items , int * i );
1313static void flatternTree (ExtractedNode * node );
@@ -16,14 +16,14 @@ static ExtractedNode *makeEntries(ExtractedNode *node, MakeEntryHandler handler,
1616static int compareNodes (const void * a1 , const void * a2 );
1717static void processGroup (ExtractedNode * node , int start , int end );
1818static void simplifyRecursive (ExtractedNode * node );
19- static int compareJsQueryItemR ( JsQueryItemR * v1 , JsQueryItemR * v2 );
19+ static int compareJsQueryItem ( JsQueryItem * v1 , JsQueryItem * v2 );
2020
2121static ExtractedNode *
22- recursiveExtract (JsQueryItemR * jsq , bool indirect , PathItem * path )
22+ recursiveExtract (JsQueryItem * jsq , bool indirect , PathItem * path )
2323{
2424 ExtractedNode * leftNode , * rightNode , * result ;
2525 PathItem * pathItem ;
26- JsQueryItemR elem , e ;
26+ JsQueryItem elem , e ;
2727
2828 check_stack_depth ();
2929
@@ -112,7 +112,7 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
112112 result -> path = path ;
113113 result -> indirect = indirect ;
114114 result -> bounds .inequality = false;
115- result -> bounds .exact = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
115+ result -> bounds .exact = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
116116 jsqGetArg (jsq , result -> bounds .exact );
117117 return result ;
118118 case jqiIn :
@@ -146,7 +146,7 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
146146 item -> path = pathItem ;
147147
148148 item -> bounds .inequality = false;
149- item -> bounds .exact = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
149+ item -> bounds .exact = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
150150 * item -> bounds .exact = e ;
151151 result -> args .items [result -> args .count ] = item ;
152152 result -> args .count ++ ;
@@ -166,14 +166,14 @@ recursiveExtract(JsQueryItemR *jsq, bool indirect, PathItem *path)
166166 {
167167 result -> bounds .leftInclusive = (jsq -> type == jqiGreaterOrEqual );
168168 result -> bounds .rightBound = NULL ;
169- result -> bounds .leftBound = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
169+ result -> bounds .leftBound = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
170170 jsqGetArg (jsq , result -> bounds .leftBound );
171171 }
172172 else
173173 {
174174 result -> bounds .rightInclusive = (jsq -> type == jqiLessOrEqual );
175175 result -> bounds .leftBound = NULL ;
176- result -> bounds .rightBound = (JsQueryItemR * )palloc (sizeof (JsQueryItemR ));
176+ result -> bounds .rightBound = (JsQueryItem * )palloc (sizeof (JsQueryItem ));
177177 jsqGetArg (jsq , result -> bounds .rightBound );
178178 }
179179 return result ;
@@ -319,7 +319,7 @@ compareNodes(const void *a1, const void *a2)
319319}
320320
321321static int
322- compareJsQueryItemR ( JsQueryItemR * v1 , JsQueryItemR * v2 )
322+ compareJsQueryItem ( JsQueryItem * v1 , JsQueryItem * v2 )
323323{
324324 char * s1 , * s2 ;
325325 int32 len1 , len2 , cmp ;
@@ -358,7 +358,7 @@ static void
358358processGroup (ExtractedNode * node , int start , int end )
359359{
360360 int i ;
361- JsQueryItemR * leftBound = NULL , * rightBound = NULL , * exact = NULL ;
361+ JsQueryItem * leftBound = NULL , * rightBound = NULL , * exact = NULL ;
362362 bool leftInclusive = false, rightInclusive = false;
363363 ExtractedNode * child ;
364364
@@ -391,7 +391,7 @@ processGroup(ExtractedNode *node, int start, int end)
391391 leftBound = child -> bounds .leftBound ;
392392 leftInclusive = child -> bounds .leftInclusive ;
393393 }
394- cmp = compareJsQueryItemR (child -> bounds .leftBound , leftBound );
394+ cmp = compareJsQueryItem (child -> bounds .leftBound , leftBound );
395395 if (cmp > 0 )
396396 {
397397 leftBound = child -> bounds .leftBound ;
@@ -409,7 +409,7 @@ processGroup(ExtractedNode *node, int start, int end)
409409 rightBound = child -> bounds .rightBound ;
410410 rightInclusive = child -> bounds .rightInclusive ;
411411 }
412- cmp = compareJsQueryItemR (child -> bounds .rightBound , rightBound );
412+ cmp = compareJsQueryItem (child -> bounds .rightBound , rightBound );
413413 if (cmp > 0 )
414414 {
415415 rightBound = child -> bounds .rightBound ;
@@ -593,7 +593,7 @@ ExtractedNode *
593593extractJsQuery (JsQuery * jq , MakeEntryHandler handler , Pointer extra )
594594{
595595 ExtractedNode * root ;
596- JsQueryItemR jsq ;
596+ JsQueryItem jsq ;
597597
598598 jsqInit (& jsq , jq );
599599 root = recursiveExtract (& jsq , false, NULL );
0 commit comments