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/tsearch/ts_parse.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/tsearch/ts_parse.c')
| -rw-r--r-- | src/backend/tsearch/ts_parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c index ccafe5f804..f503306aa0 100644 --- a/src/backend/tsearch/ts_parse.c +++ b/src/backend/tsearch/ts_parse.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.12 2009/06/11 14:49:03 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tsearch/ts_parse.c,v 1.13 2009/07/16 06:33:44 petere Exp $ * *------------------------------------------------------------------------- */ @@ -204,7 +204,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem) dict = lookup_ts_dictionary_cache(map->dictIds[i]); ld->dictState.isend = ld->dictState.getnext = false; - ld->dictState.private = NULL; + ld->dictState.private_state = NULL; res = (TSLexeme *) DatumGetPointer(FunctionCall4( &(dict->lexize), PointerGetDatum(dict->dictData), @@ -464,18 +464,18 @@ hlfinditem(HeadlineParsedText *prs, TSQuery query, char *buf, int buflen) for (i = 0; i < query->size; i++) { if (item->type == QI_VAL && - tsCompareString(GETOPERAND(query) + item->operand.distance, item->operand.length, - buf, buflen, item->operand.prefix) == 0) + tsCompareString(GETOPERAND(query) + item->qoperand.distance, item->qoperand.length, + buf, buflen, item->qoperand.prefix) == 0) { if (word->item) { memcpy(&(prs->words[prs->curwords]), word, sizeof(HeadlineWordEntry)); - prs->words[prs->curwords].item = &item->operand; + prs->words[prs->curwords].item = &item->qoperand; prs->words[prs->curwords].repeated = 1; prs->curwords++; } else - word->item = &item->operand; + word->item = &item->qoperand; } item++; } |
