1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Add const qualifiers to node inspection functions

Thomas Munro
This commit is contained in:
Peter Eisentraut
2011-12-07 21:46:56 +02:00
parent 0d0ec527af
commit d5f23af6bf
12 changed files with 913 additions and 913 deletions

View File

@ -181,9 +181,9 @@ make_opclause(Oid opno, Oid opresulttype, bool opretset,
* or (op expr)
*/
Node *
get_leftop(Expr *clause)
get_leftop(const Expr *clause)
{
OpExpr *expr = (OpExpr *) clause;
const OpExpr *expr = (const OpExpr *) clause;
if (expr->args != NIL)
return linitial(expr->args);
@ -198,9 +198,9 @@ get_leftop(Expr *clause)
* NB: result will be NULL if applied to a unary op clause.
*/
Node *
get_rightop(Expr *clause)
get_rightop(const Expr *clause)
{
OpExpr *expr = (OpExpr *) clause;
const OpExpr *expr = (const OpExpr *) clause;
if (list_length(expr->args) >= 2)
return lsecond(expr->args);