Skip to content

Commit 3d331aa

Browse files
committed
Merge branch 'master' into public_master
2 parents 20587cf + eb2ec5c commit 3d331aa

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

src/rum_ts_utils.c

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,16 @@ compareDocR(const void *va, const void *vb)
14321432
return (a->pos > b->pos) ? 1 : -1;
14331433
}
14341434

1435-
static bool
1435+
/*
1436+
* Be carefull: clang 11+ is very sensitive to casting function
1437+
* with different return value.
1438+
*/
1439+
static
1440+
#if PG_VERSION_NUM >= 130000
1441+
TSTernaryValue
1442+
#else
1443+
bool
1444+
#endif
14361445
checkcondition_QueryOperand(void *checkval, QueryOperand *val,
14371446
ExecPhraseData *data)
14381447
{
@@ -1453,7 +1462,11 @@ checkcondition_QueryOperand(void *checkval, QueryOperand *val,
14531462
data->allocated = false;
14541463
}
14551464

1456-
return qro->operandexist;
1465+
return qro->operandexist
1466+
#if PG_VERSION_NUM >= 130000
1467+
? TS_YES : TS_NO
1468+
#endif
1469+
;
14571470
}
14581471

14591472
static bool
@@ -1498,13 +1511,13 @@ Cover(DocRepresentation *doc, uint32 len, QueryRepresentation *qr,
14981511
}
14991512
}
15001513

1514+
if (TS_execute(GETQUERY(qr->query), (void *) qr,
15011515
#if PG_VERSION_NUM >= 130000
1502-
if (TS_execute(GETQUERY(qr->query), (void *) qr, TS_EXEC_SKIP_NOT,
1503-
(TSExecuteCallback) checkcondition_QueryOperand))
1516+
TS_EXEC_SKIP_NOT,
15041517
#else
1505-
if (TS_execute(GETQUERY(qr->query), (void *) qr, TS_EXEC_EMPTY,
1506-
checkcondition_QueryOperand))
1518+
TS_EXEC_EMPTY,
15071519
#endif
1520+
checkcondition_QueryOperand))
15081521
{
15091522
if (ptr->pos > ext->q)
15101523
{
@@ -1544,13 +1557,13 @@ Cover(DocRepresentation *doc, uint32 len, QueryRepresentation *qr,
15441557
WEP_SETWEIGHT(qro->pos, ptr->wclass);
15451558
}
15461559
}
1560+
if (TS_execute(GETQUERY(qr->query), (void *) qr,
15471561
#if PG_VERSION_NUM >= 130000
1548-
if (TS_execute(GETQUERY(qr->query), (void *) qr, TS_EXEC_EMPTY,
1549-
(TSExecuteCallback) checkcondition_QueryOperand))
1562+
TS_EXEC_EMPTY,
15501563
#else
1551-
if (TS_execute(GETQUERY(qr->query), (void *) qr, TS_EXEC_CALC_NOT,
1552-
checkcondition_QueryOperand))
1564+
TS_EXEC_CALC_NOT,
15531565
#endif
1566+
checkcondition_QueryOperand))
15541567
{
15551568
if (ptr->pos < ext->p)
15561569
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy