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/ruleutils.c | |
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/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index d30db3a2ba2..4345a529051 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.302 2009/07/14 20:24:10 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.303 2009/07/16 06:33:44 petere Exp $ * *------------------------------------------------------------------------- */ @@ -5910,14 +5910,14 @@ get_from_clause_item(Node *jtnode, Query *query, deparse_context *context) if (!j->isNatural) { - if (j->using) + if (j->usingClause) { ListCell *col; appendStringInfo(buf, " USING ("); - foreach(col, j->using) + foreach(col, j->usingClause) { - if (col != list_head(j->using)) + if (col != list_head(j->usingClause)) appendStringInfo(buf, ", "); appendStringInfoString(buf, quote_identifier(strVal(lfirst(col)))); @@ -6251,18 +6251,18 @@ quote_identifier(const char *ident) /* * quote_qualified_identifier - Quote a possibly-qualified identifier * - * Return a name of the form namespace.ident, or just ident if namespace + * Return a name of the form qualifier.ident, or just ident if qualifier * is NULL, quoting each component if necessary. The result is palloc'd. */ char * -quote_qualified_identifier(const char *namespace, +quote_qualified_identifier(const char *qualifier, const char *ident) { StringInfoData buf; initStringInfo(&buf); - if (namespace) - appendStringInfo(&buf, "%s.", quote_identifier(namespace)); + if (qualifier) + appendStringInfo(&buf, "%s.", quote_identifier(qualifier)); appendStringInfoString(&buf, quote_identifier(ident)); return buf.data; } |