0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05:00

patch 9.1.1692: global_functions are not constant

Problem:  global_functions are not constant
Solution: Place global_functions[] in read-only memory (Damien Lejay).

Mark global_functions[] as `static const`.  The table is never modified
at runtime, so keeping it in writable `.data` has no benefit.

Only a local pointer in func_check_arg_types() needed adjusting to
`const`.  No functional changes.

closes: #18121

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Damien Lejay
2025-08-26 21:03:31 +02:00
committed by Christian Brabandt
parent 0a9ad34cad
commit 93160530c4
3 changed files with 6 additions and 4 deletions

View File

@@ -724,6 +724,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1692,
/**/
1691,
/**/