diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2009-07-16 06:33:46 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2009-07-16 06:33:46 +0000 |
| commit | de160e2c001fc77168ff1edc815ceeec0c6d4244 (patch) | |
| tree | 15afc931e1e23706b8916619581ddd5c0bcedcee /src/backend/utils/adt/tsquery_op.c | |
| parent | 4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff) | |
| download | postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.tar.gz | |
Make backend header files C++ safe
This alters various incidental uses of C++ key words to use other similar
identifiers, so that a C++ compiler won't choke outright. You still
(probably) need extern "C" { }; around the inclusion of backend headers.
based on a patch by Kurt Harriman <harriman@acm.org>
Also add a script cpluspluscheck to check for C++ compatibility in the
future. As of right now, this passes without error for me.
Diffstat (limited to 'src/backend/utils/adt/tsquery_op.c')
| -rw-r--r-- | src/backend/utils/adt/tsquery_op.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/tsquery_op.c b/src/backend/utils/adt/tsquery_op.c index 6b7e976a43..9f1b0545ee 100644 --- a/src/backend/utils/adt/tsquery_op.c +++ b/src/backend/utils/adt/tsquery_op.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_op.c,v 1.6 2009/06/11 14:49:04 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_op.c,v 1.7 2009/07/16 06:33:44 petere Exp $ * *------------------------------------------------------------------------- */ @@ -38,7 +38,7 @@ join_tsqueries(TSQuery a, TSQuery b, int8 operator) res->valnode = (QueryItem *) palloc0(sizeof(QueryItem)); res->valnode->type = QI_OPR; - res->valnode->operator.oper = operator; + res->valnode->qoperator.oper = operator; res->child = (QTNode **) palloc0(sizeof(QTNode *) * 2); res->child[0] = QT2QTN(GETQUERY(b), GETOPERAND(b)); @@ -124,7 +124,7 @@ tsquery_not(PG_FUNCTION_ARGS) res->valnode = (QueryItem *) palloc0(sizeof(QueryItem)); res->valnode->type = QI_OPR; - res->valnode->operator.oper = OP_NOT; + res->valnode->qoperator.oper = OP_NOT; res->child = (QTNode **) palloc0(sizeof(QTNode *)); res->child[0] = QT2QTN(GETQUERY(a), GETOPERAND(a)); @@ -209,7 +209,7 @@ makeTSQuerySign(TSQuery a) for (i = 0; i < a->size; i++) { if (ptr->type == QI_VAL) - sign |= ((TSQuerySign) 1) << (ptr->operand.valcrc % TSQS_SIGLEN); + sign |= ((TSQuerySign) 1) << (ptr->qoperand.valcrc % TSQS_SIGLEN); ptr++; } @@ -255,7 +255,7 @@ tsq_mcontains(PG_FUNCTION_ARGS) if (ie[i].type != QI_VAL) continue; for (j = 0; j < query->size; j++) - if (iq[j].type == QI_VAL && ie[i].operand.valcrc == iq[j].operand.valcrc) + if (iq[j].type == QI_VAL && ie[i].qoperand.valcrc == iq[j].qoperand.valcrc) { j = query->size + 1; break; |
