diff options
| author | Peter Eisentraut | 2009-07-16 06:33:46 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2009-07-16 06:33:46 +0000 |
| commit | de160e2c001fc77168ff1edc815ceeec0c6d4244 (patch) | |
| tree | 15afc931e1e23706b8916619581ddd5c0bcedcee /src/include/tsearch | |
| parent | 4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff) | |
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/include/tsearch')
| -rw-r--r-- | src/include/tsearch/ts_public.h | 4 | ||||
| -rw-r--r-- | src/include/tsearch/ts_type.h | 6 | ||||
| -rw-r--r-- | src/include/tsearch/ts_utils.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h index 253fa1451c4..61a3d220255 100644 --- a/src/include/tsearch/ts_public.h +++ b/src/include/tsearch/ts_public.h @@ -6,7 +6,7 @@ * * Copyright (c) 1998-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/tsearch/ts_public.h,v 1.14 2009/06/11 14:49:12 momjian Exp $ + * $PostgreSQL: pgsql/src/include/tsearch/ts_public.h,v 1.15 2009/07/16 06:33:45 petere Exp $ * *------------------------------------------------------------------------- */ @@ -111,7 +111,7 @@ typedef struct bool isend; /* in: marks for lexize_info about text end is * reached */ bool getnext; /* out: dict wants next lexeme */ - void *private; /* internal dict state between calls with + void *private_state; /* internal dict state between calls with * getnext == true */ } DictSubState; diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h index 60c16553eaf..6036110c192 100644 --- a/src/include/tsearch/ts_type.h +++ b/src/include/tsearch/ts_type.h @@ -5,7 +5,7 @@ * * Copyright (c) 1998-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/tsearch/ts_type.h,v 1.15 2009/01/01 17:24:01 momjian Exp $ + * $PostgreSQL: pgsql/src/include/tsearch/ts_type.h,v 1.16 2009/07/16 06:33:45 petere Exp $ * *------------------------------------------------------------------------- */ @@ -218,8 +218,8 @@ typedef struct typedef union { QueryItemType type; - QueryOperator operator; - QueryOperand operand; + QueryOperator qoperator; + QueryOperand qoperand; } QueryItem; /* diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index 566227ef6fb..db9a43be993 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -5,7 +5,7 @@ * * Copyright (c) 1998-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.17 2009/06/11 14:49:12 momjian Exp $ + * $PostgreSQL: pgsql/src/include/tsearch/ts_utils.h,v 1.18 2009/07/16 06:33:46 petere Exp $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ extern TSQuery parse_tsquery(char *buf, extern void pushValue(TSQueryParserState state, char *strval, int lenval, int2 weight, bool prefix); extern void pushStop(TSQueryParserState state); -extern void pushOperator(TSQueryParserState state, int8 operator); +extern void pushOperator(TSQueryParserState state, int8 oper); /* * parse plain text and lexize words |
