From 5d4e1725d43809baf667c51cba8fa8f1dec3220b Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 16 Dec 2013 22:13:31 +0100 Subject: [PATCH] APIDump: Ignoring the multi-inheritance members. We may get to documenting them one day, but for now they are unused anyway, so there's no point in documenting them. They are a by-product of multiple inheritance, re-introduced due to #422. --- MCServer/Plugins/APIDump/APIDesc.lua | 11 ++++++++++- MCServer/Plugins/APIDump/main_APIDump.lua | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 214b45a70..5bc4a5f39 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2713,8 +2713,8 @@ end "os", "string", "table", - "g_TrackedPages", "g_Stats", + "g_TrackedPages", }, IgnoreFunctions = @@ -2747,6 +2747,15 @@ end "WriteStats", }, + IgnoreConstants = + { + "cChestEntity.__cBlockEntityWindowOwner__", + "cDropSpenserEntity.__cBlockEntityWindowOwner__", + "cFurnaceEntity.__cBlockEntityWindowOwner__", + "cHopperEntity.__cBlockEntityWindowOwner__", + "cLuaWindow.__cItemGrid__cListener__", + }, + IgnoreVariables = { "__.*__", -- tolua exports multiple inheritance this way diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index de4239f7e..ec5569f55 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -700,6 +700,15 @@ function ReadDescriptions(a_API) end ); + -- Remove ignored constants: + local NewConstants = {}; + for j, cn in ipairs(cls.Constants) do + if (not(IsFunctionIgnored(cls.Name, cn.Name))) then + table.insert(NewConstants, cn); + end + end -- for j, cn + cls.Constants = NewConstants; + -- Sort the constants: table.sort(cls.Constants, function(c1, c2) @@ -707,7 +716,7 @@ function ReadDescriptions(a_API) end ); - -- Remove ignored functions: + -- Remove ignored member variables: local NewVariables = {}; for j, var in ipairs(cls.Variables) do if (not(IsVariableIgnored(cls.Name .. "." .. var.Name))) then