mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user