diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-10-10 07:50:15 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-10-10 07:50:43 +0200 |
commit | 1d91d24d9a831be0bb90ec71934f735c52456c57 (patch) | |
tree | 47c9ba51a493bb78cf6695fdf815ea15d2ca24f5 /src/backend/utils/adt/jsonb.c | |
parent | fc4089f3c65a5f1b413a3299ba02b66a8e5e37d0 (diff) | |
download | postgresql-1d91d24d9a831be0bb90ec71934f735c52456c57.tar.gz postgresql-1d91d24d9a831be0bb90ec71934f735c52456c57.zip |
Add const to values and nulls arguments
This excludes any changes that would change the external AM APIs.
Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Discussion: https://www.postgresql.org/message-id/flat/14c31f4a-0347-0805-dce8-93a9072c05a5%40eisentraut.org
Diffstat (limited to 'src/backend/utils/adt/jsonb.c')
-rw-r--r-- | src/backend/utils/adt/jsonb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index b10a60ac665..6f445f5c2bc 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -58,7 +58,7 @@ static void jsonb_put_escaped_value(StringInfo out, JsonbValue *scalarVal); static JsonParseErrorType jsonb_in_scalar(void *pstate, char *token, JsonTokenType tokentype); static void composite_to_jsonb(Datum composite, JsonbInState *result); static void array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, - Datum *vals, bool *nulls, int *valcount, + const Datum *vals, const bool *nulls, int *valcount, JsonTypeCategory tcategory, Oid outfuncoid); static void array_to_jsonb_internal(Datum array, JsonbInState *result); static void datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result, @@ -864,8 +864,8 @@ datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result, * ourselves recursively to process the next dimension. */ static void -array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, Datum *vals, - bool *nulls, int *valcount, JsonTypeCategory tcategory, +array_dim_to_jsonb(JsonbInState *result, int dim, int ndims, int *dims, const Datum *vals, + const bool *nulls, int *valcount, JsonTypeCategory tcategory, Oid outfuncoid) { int i; @@ -1127,7 +1127,7 @@ datum_to_jsonb(Datum val, JsonTypeCategory tcategory, Oid outfuncoid) } Datum -jsonb_build_object_worker(int nargs, Datum *args, bool *nulls, Oid *types, +jsonb_build_object_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null, bool unique_keys) { int i; @@ -1212,7 +1212,7 @@ jsonb_build_object_noargs(PG_FUNCTION_ARGS) } Datum -jsonb_build_array_worker(int nargs, Datum *args, bool *nulls, Oid *types, +jsonb_build_array_worker(int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null) { int i; |