postgresql/src/backend/tsearch
Heikki Linnakangas d5f139cb68 Constify fields and parameters in spell.c
I started by marking VoidString as const, and fixing the fallout by
marking more fields and function arguments as const. It proliferated
quite a lot, but all within spell.c and spell.h.

A more narrow patch to get rid of the static VoidString buffer would
be to replace it with '#define VoidString ""', as C99 allows assigning
"" to a non-const pointer, even though you're not allowed to modify
it. But it seems like good hygiene to mark all these as const. In the
structs, the pointers can point to the constant VoidString, or a
buffer allocated with palloc(), or with compact_palloc(), so you
should not modify them.

Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/54c29fb0-edf2-48ea-9814-44e918bbd6e8@iki.fi
2024-08-06 23:04:51 +03:00
..
dicts Update copyright for 2019 2019-01-02 12:44:25 -05:00
dict.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
dict_ispell.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
dict_simple.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
dict_synonym.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
dict_thesaurus.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
regis.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
spell.c Constify fields and parameters in spell.c 2024-08-06 23:04:51 +03:00
to_tsany.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
ts_locale.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
ts_parse.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
ts_selfuncs.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
ts_typanalyze.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
ts_utils.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
wparser.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
wparser_def.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00