aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-11-19 12:57:10 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-11-19 12:57:10 +0000
commita09049e563775216fd0d0c8f0a4485833bbc4c5b (patch)
treeb3938e7ff43749c25dcbeb04b65aacfc2e8c0090
parentelua: simplify lualian typeconv (diff)
downloadefl-a09049e563775216fd0d0c8f0a4485833bbc4c5b.tar.gz
elua: do not emit spaces where not required
-rw-r--r--src/bin/elua/modules/lualian.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index ccf30dff34..8d77094056 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -233,9 +233,13 @@ local Method = Node:clone {
gen_ffi = function(self, s)
local proto = self:gen_proto()
+ local ret = proto.ret_type
+ if ret:match("[a-zA-Z0-9_]$") then
+ ret = ret .. " "
+ end
local cproto = {
- " ", proto.ret_type, " ", proto.full_name, "(",
- table.concat(proto.cargs, ", "), ");\n"
+ " ", ret, proto.full_name, "(", table.concat(proto.cargs, ", "),
+ ");\n"
}
s:write(table.concat(cproto))
end