forked from enlightenment/efl
docs: always generate arrays instead of iterators in Class
This commit is contained in:
parent
ae1841dd19
commit
ab963858bc
|
@ -147,11 +147,11 @@ M.Class = Node:clone {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
inherits_get = function(self)
|
inherits_get = function(self)
|
||||||
return self.class:inherits_get()--:to_array()
|
return self.class:inherits_get():to_array()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
functions_get = function(self, ft)
|
functions_get = function(self, ft)
|
||||||
return self.class:functions_get(ft)--:to_array()
|
return self.class:functions_get(ft):to_array()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
function_get_by_name = function(self, fn, ft)
|
function_get_by_name = function(self, fn, ft)
|
||||||
|
@ -159,7 +159,7 @@ M.Class = Node:clone {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
events_get = function(self)
|
events_get = function(self)
|
||||||
return self.class:events_get()--:to_array()
|
return self.class:events_get():to_array()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
c_get_function_name_get = function(self)
|
c_get_function_name_get = function(self)
|
||||||
|
|
|
@ -128,7 +128,7 @@ M.check_class = function(cl)
|
||||||
stat_incr(ct, false)
|
stat_incr(ct, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
for ev in cl:events_get() do
|
for i, ev in ipairs(cl:events_get()) do
|
||||||
if not ev:documentation_get() then
|
if not ev:documentation_get() then
|
||||||
print_missing(cl:full_name_get() .. "." .. ev:name_get(), "event")
|
print_missing(cl:full_name_get() .. "." .. ev:name_get(), "event")
|
||||||
stat_incr("event", true)
|
stat_incr("event", true)
|
||||||
|
|
|
@ -359,7 +359,7 @@ local build_reftable = function(f, title, ctitle, ctype, t, iscl)
|
||||||
end
|
end
|
||||||
|
|
||||||
local build_functable = function(f, title, ctitle, cl, tp)
|
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
|
if #t == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -449,7 +449,7 @@ build_inherits = function(cl, t, lvl)
|
||||||
lbuf:write_b(lbuf:finish())
|
lbuf:write_b(lbuf:finish())
|
||||||
end
|
end
|
||||||
t[#t + 1] = { lvl, lbuf:finish() }
|
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)
|
local acl = dtree.Class.by_name_get(cln)
|
||||||
if not acl then
|
if not acl then
|
||||||
error("error retrieving inherited class " .. cln)
|
error("error retrieving inherited class " .. cln)
|
||||||
|
@ -702,7 +702,7 @@ end
|
||||||
local build_igraph_r
|
local build_igraph_r
|
||||||
build_igraph_r = function(cl, nbuf, ibuf)
|
build_igraph_r = function(cl, nbuf, ibuf)
|
||||||
local sn = cl:full_name_get():lower():gsub("%.", "_")
|
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)
|
local acl = dtree.Class.by_name_get(cln)
|
||||||
if not acl then
|
if not acl then
|
||||||
error("error retrieving inherited class " .. cln)
|
error("error retrieving inherited class " .. cln)
|
||||||
|
@ -763,7 +763,7 @@ local build_class = function(cl)
|
||||||
cl, eolian.function_type.PROPERTY)
|
cl, eolian.function_type.PROPERTY)
|
||||||
|
|
||||||
f:write_h("Events", 3)
|
f:write_h("Events", 3)
|
||||||
local evs = cl:events_get():to_array()
|
local evs = cl:events_get()
|
||||||
if #evs == 0 then
|
if #evs == 0 then
|
||||||
f:write_raw("This class does not define any events.\n")
|
f:write_raw("This class does not define any events.\n")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue