elua: generator fix
This commit is contained in:
parent
3e65deabf8
commit
072f318d44
|
@ -388,9 +388,10 @@ local Constructor = Method:clone {
|
||||||
s:write(" local ", v[2], " = ffi.new(\"", v[1], "[1]\")\n")
|
s:write(" local ", v[2], " = ffi.new(\"", v[1], "[1]\")\n")
|
||||||
end
|
end
|
||||||
local genv = (proto.ret_type ~= "void")
|
local genv = (proto.ret_type ~= "void")
|
||||||
|
local cvargs = table.concat(proto.vargs, ", ")
|
||||||
|
if cvargs ~= "" then cvargs = ", " .. cvargs end
|
||||||
s:write(" ", genv and "local v = " or "", "self:__ctor_common(",
|
s:write(" ", genv and "local v = " or "", "self:__ctor_common(",
|
||||||
"__class, parent, __lib.", proto.full_name, ", ",
|
"__class, parent, __lib.", proto.full_name, cvargs, ")\n")
|
||||||
table.concat(proto.vargs, ", "), ")\n")
|
|
||||||
if not defctor then
|
if not defctor then
|
||||||
table.insert(proto.rets, 1, "self")
|
table.insert(proto.rets, 1, "self")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue