summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
authorPeter Eisentraut2025-10-31 09:45:02 +0000
committerPeter Eisentraut2025-10-31 09:47:25 +0000
commit8a27d418f8fc08b62f371c1b167efbfbf0a2a24e (patch)
tree414b7c6d0f4813aadb4b80f41774131180fe867e /src/test/modules
parentaa4535307e3d432f44b4c76b8ffebc5a0789250c (diff)
Mark function arguments of type "Datum *" as "const Datum *" where possible
Several functions in the codebase accept "Datum *" parameters but do not modify the pointed-to data. These have been updated to take "const Datum *" instead, improving type safety and making the interfaces clearer about their intent. This change helps the compiler catch accidental modifications and better documents immutability of arguments. Most of "Datum *" parameters have a pairing "bool *isnull" parameter, they are constified as well. No functional behavior is changed by this patch. Author: Chao Li <lic@highgo.com> Discussion: https://www.postgresql.org/message-id/flat/CAEoWx2msfT0knvzUa72ZBwu9LR_RLY4on85w2a9YpE-o2By5HQ@mail.gmail.com
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/spgist_name_ops/spgist_name_ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/modules/spgist_name_ops/spgist_name_ops.c b/src/test/modules/spgist_name_ops/spgist_name_ops.c
index bcc16ce366e..38e54e0e0a4 100644
--- a/src/test/modules/spgist_name_ops/spgist_name_ops.c
+++ b/src/test/modules/spgist_name_ops/spgist_name_ops.c
@@ -94,7 +94,7 @@ commonPrefix(const char *a, const char *b, int lena, int lenb)
* On success, *i gets the match location; on failure, it gets where to insert
*/
static bool
-searchChar(Datum *nodeLabels, int nNodes, int16 c, int *i)
+searchChar(const Datum *nodeLabels, int nNodes, int16 c, int *i)
{
int StopLow = 0,
StopHigh = nNodes;