From 7d0fc179e689ca12f647166b8687928a7a65e380 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Tue, 11 Apr 2017 23:56:18 +0300 Subject: genmsgpack: Do not export functions with __ --- scripts/genmsgpack.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'scripts') 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 -- cgit