Skip to content

Commit a67a496

Browse files
committed
Rename C23 keyword
constexpr is a keyword in C23. Rename a conflicting identifier for future-proofing. Reviewed-by: Robert Haas <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/08abc832-1384-4aca-a535-1a79765b565e%40eisentraut.org
1 parent ea92f3a commit a67a496

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/backend/optimizer/util/predtest.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ boolexpr_startup_fn(Node *clause, PredIterInfo info)
948948
typedef struct
949949
{
950950
OpExpr opexpr;
951-
Const constexpr;
951+
Const const_expr;
952952
int next_elem;
953953
int num_elems;
954954
Datum *elem_values;
@@ -992,13 +992,13 @@ arrayconst_startup_fn(Node *clause, PredIterInfo info)
992992
state->opexpr.args = list_copy(saop->args);
993993

994994
/* Set up a dummy Const node to hold the per-element values */
995-
state->constexpr.xpr.type = T_Const;
996-
state->constexpr.consttype = ARR_ELEMTYPE(arrayval);
997-
state->constexpr.consttypmod = -1;
998-
state->constexpr.constcollid = arrayconst->constcollid;
999-
state->constexpr.constlen = elmlen;
1000-
state->constexpr.constbyval = elmbyval;
1001-
lsecond(state->opexpr.args) = &state->constexpr;
995+
state->const_expr.xpr.type = T_Const;
996+
state->const_expr.consttype = ARR_ELEMTYPE(arrayval);
997+
state->const_expr.consttypmod = -1;
998+
state->const_expr.constcollid = arrayconst->constcollid;
999+
state->const_expr.constlen = elmlen;
1000+
state->const_expr.constbyval = elmbyval;
1001+
lsecond(state->opexpr.args) = &state->const_expr;
10021002

10031003
/* Initialize iteration state */
10041004
state->next_elem = 0;
@@ -1011,8 +1011,8 @@ arrayconst_next_fn(PredIterInfo info)
10111011

10121012
if (state->next_elem >= state->num_elems)
10131013
return NULL;
1014-
state->constexpr.constvalue = state->elem_values[state->next_elem];
1015-
state->constexpr.constisnull = state->elem_nulls[state->next_elem];
1014+
state->const_expr.constvalue = state->elem_values[state->next_elem];
1015+
state->const_expr.constisnull = state->elem_nulls[state->next_elem];
10161016
state->next_elem++;
10171017
return (Node *) &(state->opexpr);
10181018
}

0 commit comments

Comments
 (0)