summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/main.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-14 23:21:10 +0200
committermadmaxoft <github@xoft.cz>2013-09-14 23:21:10 +0200
commitc3ad5bbf91a2b47e5f2944a9751f4cfc02381a02 (patch)
treea04a9b16779c68fc9e1a2c41424d2a81b6d52d69 /MCServer/Plugins/APIDump/main.lua
parentAPIDump: Fixed cLuaWindow documentation. (diff)
downloadcuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar.gz
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar.bz2
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar.lz
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar.xz
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.tar.zst
cuberite-c3ad5bbf91a2b47e5f2944a9751f4cfc02381a02.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/main.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index 280e3034c..7a7cc84c2 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -265,16 +265,20 @@ function DumpAPIHtml()
-- The whole class is not exported
f:write("class\t" .. clsname .. "\n");
else
- for fnname, fnapi in pairs(cls.Functions) do
- if not(fnapi.IsExported) then
- f:write("func\t" .. clsname .. "." .. fnname .. "\n");
- end
- end -- for j, fn - cls.Functions[]
- for cnname, cnapi in pairs(cls.Constants) do
- if not(cnapi.IsExported) then
- f:write("const\t" .. clsname .. "." .. cnname .. "\n");
- end
- end -- for j, fn - cls.Functions[]
+ if (cls.Functions ~= nil) then
+ for fnname, fnapi in pairs(cls.Functions) do
+ if not(fnapi.IsExported) then
+ f:write("func\t" .. clsname .. "." .. fnname .. "\n");
+ end
+ end -- for j, fn - cls.Functions[]
+ end
+ if (cls.Constants ~= nil) then
+ for cnname, cnapi in pairs(cls.Constants) do
+ if not(cnapi.IsExported) then
+ f:write("const\t" .. clsname .. "." .. cnname .. "\n");
+ end
+ end -- for j, fn - cls.Functions[]
+ end
end
end -- for i, cls - g_APIDesc.Classes[]
f:close();