|
|
|
@ -57,28 +57,43 @@ M.new = function()
|
|
|
|
|
return eolian.new() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
M.get_c_functions = function(eos) |
|
|
|
|
local f_is_beta = function(fn) |
|
|
|
|
if legacy then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
return fn:is_beta() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
M.get_c_functions = function(eos, only_legacy) |
|
|
|
|
only_legacy = not not only_legacy |
|
|
|
|
local ret = {} |
|
|
|
|
for cl in eos:classes_get() do |
|
|
|
|
local fntp = eolian.function_type |
|
|
|
|
for fn in cl:functions_get(fntp.METHOD) do |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.METHOD, false) |
|
|
|
|
if not only_legacy or not f_is_beta(fn) then |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.METHOD, only_legacy) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
for fn in cl:functions_get(fntp.PROPERTY) do |
|
|
|
|
local tp = fn:type_get() |
|
|
|
|
if tp == fntp.PROPERTY then |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.PROP_GET, false) |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.PROP_SET, false) |
|
|
|
|
else |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(tp, false) |
|
|
|
|
if not only_legacy or not f_is_beta(fn) then |
|
|
|
|
local tp = fn:type_get() |
|
|
|
|
if tp == fntp.PROPERTY then |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.PROP_GET, only_legacy) |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(fntp.PROP_SET, only_legacy) |
|
|
|
|
else |
|
|
|
|
ret[#ret + 1] = fn:full_c_name_get(tp, only_legacy) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
return ret |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
M.get_c_events = function(eos) |
|
|
|
|
M.get_c_events = function(eos, only_legacy) |
|
|
|
|
local ret = {} |
|
|
|
|
if only_legacy then |
|
|
|
|
return ret |
|
|
|
|
end |
|
|
|
|
for cl in eos:classes_get() do |
|
|
|
|
for ev in cl:events_get() do |
|
|
|
|
ret[#ret + 1] = ev:c_name_get() |
|
|
|
@ -94,8 +109,8 @@ local full_name_get = function(obj)
|
|
|
|
|
return obj:name_get() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
M.get_c_function_pointers = function(eos) |
|
|
|
|
if legacy then |
|
|
|
|
M.get_c_function_pointers = function(eos, only_legacy) |
|
|
|
|
if legacy or only_legacy then |
|
|
|
|
-- no function pointer support in pre-state api |
|
|
|
|
return {} |
|
|
|
|
end |
|
|
|
|