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/parser/parse_expr.c | |
parent | 4ef8dc7a75a9a408b34338854dd0d412ea01c504 (diff) | |
download | postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.tar.gz postgresql-de160e2c001fc77168ff1edc815ceeec0c6d4244.zip |
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/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 08e062d311e..a8adac1472e 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.241 2009/06/11 14:49:00 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.242 2009/07/16 06:33:43 petere Exp $ * *------------------------------------------------------------------------- */ @@ -159,7 +159,7 @@ transformExpr(ParseState *pstate, Node *expr) Oid elementType; int32 targetTypmod; - targetType = typenameTypeId(pstate, tc->typename, + targetType = typenameTypeId(pstate, tc->typeName, &targetTypmod); elementType = get_element_type(targetType); if (OidIsValid(elementType)) @@ -1773,7 +1773,7 @@ transformXmlSerialize(ParseState *pstate, XmlSerialize *xs) XMLOID, "XMLSERIALIZE")); - targetType = typenameTypeId(pstate, xs->typename, &targetTypmod); + targetType = typenameTypeId(pstate, xs->typeName, &targetTypmod); xexpr->xmloption = xs->xmloption; xexpr->location = xs->location; @@ -2000,7 +2000,7 @@ transformTypeCast(ParseState *pstate, TypeCast *tc) int32 targetTypmod; int location; - targetType = typenameTypeId(pstate, tc->typename, &targetTypmod); + targetType = typenameTypeId(pstate, tc->typeName, &targetTypmod); if (inputType == InvalidOid) return expr; /* do nothing if NULL input */ @@ -2012,7 +2012,7 @@ transformTypeCast(ParseState *pstate, TypeCast *tc) */ location = tc->location; if (location < 0) - location = tc->typename->location; + location = tc->typeName->location; result = coerce_to_target_type(pstate, expr, inputType, targetType, targetTypmod, |