mirror of
https://github.com/neovim/neovim.git
synced 2026-04-27 09:44:07 +00:00
api: Allow blacklist functions that shouldn't be accesible from eval
Blacklist deprecated functions and functions depending on channel_id
This commit is contained in:
@@ -25,11 +25,13 @@ local gperfpipe = io.open(funcsfname .. '.gperf', 'wb')
|
||||
local funcs = require('eval').funcs
|
||||
local metadata = mpack.unpack(io.open(arg[3], 'rb'):read("*all"))
|
||||
for i,fun in ipairs(metadata) do
|
||||
funcs['api_'..fun.name] = {
|
||||
args=#fun.parameters,
|
||||
func='api_wrapper',
|
||||
data='&handle_'..fun.name,
|
||||
}
|
||||
if not fun.noeval then
|
||||
funcs['api_'..fun.name] = {
|
||||
args=#fun.parameters,
|
||||
func='api_wrapper',
|
||||
data='&handle_'..fun.name,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
local funcsdata = io.open(funcs_file, 'w')
|
||||
|
||||
Reference in New Issue
Block a user