diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-06-20 13:09:06 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@proton.me> | 2023-06-20 20:38:15 +0600 |
commit | 3681b7bb3bb942462c4261ab477e8912ae35b1a9 (patch) | |
tree | eed274e4907c0fa6d9f8546830e60fa2859ceeb1 /src/nvim/generators/gen_options.lua | |
parent | c07dceba335c56c9a356395ad0d1e5a14d416752 (diff) | |
download | rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.tar.gz rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.tar.bz2 rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.zip |
refactor(option): use `void *` for pointer to option value
Option related code uses `char *` for pointer to option value, which is not the best way of representing a type-agnostic pointer.
Solution: Make pointers to option value use `void *` instead.
Diffstat (limited to 'src/nvim/generators/gen_options.lua')
-rw-r--r-- | src/nvim/generators/gen_options.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/generators/gen_options.lua b/src/nvim/generators/gen_options.lua index ecb1a0c11b..03b1fbec8a 100644 --- a/src/nvim/generators/gen_options.lua +++ b/src/nvim/generators/gen_options.lua @@ -108,7 +108,7 @@ local value_dumpers = { } local get_value = function(v) - return '(char *) ' .. value_dumpers[type(v)](v) + return '(void *) ' .. value_dumpers[type(v)](v) end local get_defaults = function(d,n) @@ -131,7 +131,7 @@ local dump_option = function(i, o) w(get_cond(o.enable_if)) end if o.varname then - w(' .var=(char *)&' .. o.varname) + w(' .var=&' .. o.varname) elseif #o.scope == 1 and o.scope[1] == 'window' then w(' .var=VAR_WIN') end |