]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1692: global_functions are not constant v9.1.1692
authorDamien Lejay <damien@lejay.be>
Tue, 26 Aug 2025 19:03:31 +0000 (21:03 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 26 Aug 2025 19:03:31 +0000 (21:03 +0200)
commit93160530c470c58a697b5e292e2c4916a88afd38
tree1a77e307a9911ad01f025a690a19aa3c7127d26a
parent0a9ad34cad8e104dd8eaf4c45af007bf049104e0
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>
src/evalfunc.c
src/testdir/test_function_lists.vim
src/version.c