Skip to content

Commit 807e4bc

Browse files
committed
Sprinkle some const decorations
These mainly help understanding the function signatures better.
1 parent 55853d6 commit 807e4bc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ coerce_type(ParseState *pstate, Node *node,
540540
* as this determines the set of available casts.
541541
*/
542542
bool
543-
can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids,
543+
can_coerce_type(int nargs, const Oid *input_typeids, const Oid *target_typeids,
544544
CoercionContext ccontext)
545545
{
546546
bool have_generics = false;
@@ -1467,8 +1467,8 @@ coerce_to_common_type(ParseState *pstate, Node *node,
14671467
* We do not ereport here, but just return false if a rule is violated.
14681468
*/
14691469
bool
1470-
check_generic_type_consistency(Oid *actual_arg_types,
1471-
Oid *declared_arg_types,
1470+
check_generic_type_consistency(const Oid *actual_arg_types,
1471+
const Oid *declared_arg_types,
14721472
int nargs)
14731473
{
14741474
int j;
@@ -1664,7 +1664,7 @@ check_generic_type_consistency(Oid *actual_arg_types,
16641664
* assume that successive inputs are of the same actual element type.
16651665
*/
16661666
Oid
1667-
enforce_generic_type_consistency(Oid *actual_arg_types,
1667+
enforce_generic_type_consistency(const Oid *actual_arg_types,
16681668
Oid *declared_arg_types,
16691669
int nargs,
16701670
Oid rettype,

src/include/parser/parse_coerce.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern Node *coerce_to_target_type(ParseState *pstate,
4141
CoercionContext ccontext,
4242
CoercionForm cformat,
4343
int location);
44-
extern bool can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids,
44+
extern bool can_coerce_type(int nargs, const Oid *input_typeids, const Oid *target_typeids,
4545
CoercionContext ccontext);
4646
extern Node *coerce_type(ParseState *pstate, Node *node,
4747
Oid inputTypeId, Oid targetTypeId, int32 targetTypeMod,
@@ -71,10 +71,10 @@ extern Node *coerce_to_common_type(ParseState *pstate, Node *node,
7171
Oid targetTypeId,
7272
const char *context);
7373

74-
extern bool check_generic_type_consistency(Oid *actual_arg_types,
75-
Oid *declared_arg_types,
74+
extern bool check_generic_type_consistency(const Oid *actual_arg_types,
75+
const Oid *declared_arg_types,
7676
int nargs);
77-
extern Oid enforce_generic_type_consistency(Oid *actual_arg_types,
77+
extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
7878
Oid *declared_arg_types,
7979
int nargs,
8080
Oid rettype,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy