elua: lualian: remove out/inout support on keys

This commit is contained in:
Daniel Kolesa 2014-04-28 11:43:12 +01:00 committed by Daniel Kolesa
parent 754f0fee79
commit 7876dd579f
1 changed files with 7 additions and 20 deletions

View File

@ -268,33 +268,20 @@ local Property = Method:clone {
local dirs = eolian.parameter_dir local dirs = eolian.parameter_dir
local kprop = false
local fulln = proto.full_name local fulln = proto.full_name
if #keys > 0 then if #keys > 0 then
local argn = (#keys > 1) and "keys" or "key" local argn = (#keys > 1) and "keys" or "key"
for i, v in ipairs(keys) do for i, v in ipairs(keys) do
local dir, tp, nm = v:information_get() local nm = v:name_get()
local tps = v:types_list_get() local tps = v:types_list_get()
if dir == dirs.OUT or dir == dirs.INOUT then local tp = select(2, tps:information_get())
if dir == dirs.INOUT then kprop = true end cargs [#cargs + 1] = tp .. " " .. nm
cargs [#cargs + 1] = tp .. " *" .. nm vargs [#vargs + 1] = typeconv(tps, argn .. "[" .. i
vargs [#vargs + 1] = nm .. "]", fulln, #vargs + 1, true)
allocs[#allocs + 1] = { tp, nm, (dir == dirs.INOUT)
and typeconv(tps, (argn .. "[" .. i .. "]"),
fulln, #vargs, true) or nil }
rets [#rets + 1] = typeconv(tps, nm .. "[0]", fulln,
#rets + 1, false)
else
kprop = true
cargs [#cargs + 1] = tp .. " " .. nm
vargs [#vargs + 1] = typeconv(tps, argn .. "[" .. i
.. "]", fulln, #vargs + 1, true)
end
end end
if kprop then args[#args + 1] = argn end args[#args + 1] = argn
end end
proto.kprop = #keys > 0
proto.kprop = kprop
if #vals > 0 then if #vals > 0 then
if self.isget then if self.isget then