diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-04-11 23:56:18 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-11 23:56:18 +0300 |
commit | 7d0fc179e689ca12f647166b8687928a7a65e380 (patch) | |
tree | f8ec05270c824d155450b5a6a23f1a711a8bd7d0 /scripts/genmsgpack.lua | |
parent | 78082e8d3e54b4bee47d8a6c9ae2530a7e992dc9 (diff) | |
download | rneovim-7d0fc179e689ca12f647166b8687928a7a65e380.tar.gz rneovim-7d0fc179e689ca12f647166b8687928a7a65e380.tar.bz2 rneovim-7d0fc179e689ca12f647166b8687928a7a65e380.zip |
genmsgpack: Do not export functions with __
Diffstat (limited to 'scripts/genmsgpack.lua')
-rw-r--r-- | scripts/genmsgpack.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/genmsgpack.lua b/scripts/genmsgpack.lua index c3b3f42618..9018ac8576 100644 --- a/scripts/genmsgpack.lua +++ b/scripts/genmsgpack.lua @@ -127,7 +127,9 @@ local deprecated_aliases = require("api.dispatch_deprecated") for i,f in ipairs(shallowcopy(functions)) do local ismethod = false if startswith(f.name, "nvim_") then - if f.since == nil then + if startswith(f.name, "nvim__") then + f.since = -1 + elseif f.since == nil then print("Function "..f.name.." lacks since field.\n") os.exit(1) end @@ -174,11 +176,13 @@ exported_attributes = {'name', 'parameters', 'return_type', 'method', 'since', 'deprecated_since'} exported_functions = {} for _,f in ipairs(functions) do - local f_exported = {} - for _,attr in ipairs(exported_attributes) do - f_exported[attr] = f[attr] + if not startswith(f.name, "nvim__") then + local f_exported = {} + for _,attr in ipairs(exported_attributes) do + f_exported[attr] = f[attr] + end + exported_functions[#exported_functions+1] = f_exported end - exported_functions[#exported_functions+1] = f_exported end |