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/tsrank.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/tsrank.c')
-rw-r--r-- | src/backend/utils/adt/tsrank.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index 3dac5ce0cd..65c7e6fa81 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.15 2009/06/11 14:49:04 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.16 2009/07/16 06:33:44 petere Exp $ * *------------------------------------------------------------------------- */ @@ -358,7 +358,7 @@ calc_rank(float *w, TSVector t, TSQuery q, int4 method) return 0.0; /* XXX: What about NOT? */ - res = (item->type == QI_OPR && item->operator.oper == OP_AND) ? + res = (item->type == QI_OPR && item->qoperator.oper == OP_AND) ? calc_rank_and(w, t, q) : calc_rank_or(w, t, q); if (res < 0) @@ -641,7 +641,7 @@ get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen) if (item[i].type != QI_VAL) continue; - curoperand = &item[i].operand; + curoperand = &item[i].qoperand; if (QR_GET_OPERAND_EXISTS(qr, &item[i])) continue; @@ -680,8 +680,8 @@ get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen) for (k = 0; k < qr->query->size; k++) { - QueryOperand *kptr = &item[k].operand; - QueryOperand *iptr = &item[i].operand; + QueryOperand *kptr = &item[k].qoperand; + QueryOperand *iptr = &item[i].qoperand; if (k == i || (item[k].type == QI_VAL && |