docs: always generate arrays instead of iterators in Class

This commit is contained in:
Daniel Kolesa 2016-08-11 16:03:12 +01:00
parent ae1841dd19
commit ab963858bc
3 changed files with 8 additions and 8 deletions

View File

@ -147,11 +147,11 @@ M.Class = Node:clone {
end,
inherits_get = function(self)
return self.class:inherits_get()--:to_array()
return self.class:inherits_get():to_array()
end,
functions_get = function(self, ft)
return self.class:functions_get(ft)--:to_array()
return self.class:functions_get(ft):to_array()
end,
function_get_by_name = function(self, fn, ft)
@ -159,7 +159,7 @@ M.Class = Node:clone {
end,
events_get = function(self)
return self.class:events_get()--:to_array()
return self.class:events_get():to_array()
end,
c_get_function_name_get = function(self)

View File

@ -128,7 +128,7 @@ M.check_class = function(cl)
stat_incr(ct, false)
end
for ev in cl:events_get() do
for i, ev in ipairs(cl:events_get()) do
if not ev:documentation_get() then
print_missing(cl:full_name_get() .. "." .. ev:name_get(), "event")
stat_incr("event", true)

View File

@ -359,7 +359,7 @@ local build_reftable = function(f, title, ctitle, ctype, t, iscl)
end
local build_functable = function(f, title, ctitle, cl, tp)
local t = cl:functions_get(tp):to_array()
local t = cl:functions_get(tp)
if #t == 0 then
return
end
@ -449,7 +449,7 @@ build_inherits = function(cl, t, lvl)
lbuf:write_b(lbuf:finish())
end
t[#t + 1] = { lvl, lbuf:finish() }
for cln in cl:inherits_get() do
for i, cln in ipairs(cl:inherits_get()) do
local acl = dtree.Class.by_name_get(cln)
if not acl then
error("error retrieving inherited class " .. cln)
@ -702,7 +702,7 @@ end
local build_igraph_r
build_igraph_r = function(cl, nbuf, ibuf)
local sn = cl:full_name_get():lower():gsub("%.", "_")
for cln in cl:inherits_get() do
for i, cln in ipairs(cl:inherits_get()) do
local acl = dtree.Class.by_name_get(cln)
if not acl then
error("error retrieving inherited class " .. cln)
@ -763,7 +763,7 @@ local build_class = function(cl)
cl, eolian.function_type.PROPERTY)
f:write_h("Events", 3)
local evs = cl:events_get():to_array()
local evs = cl:events_get()
if #evs == 0 then
f:write_raw("This class does not define any events.\n")
else