q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8a9c3a028e0888d027c95e8aed89440368e9cde9

commit 8a9c3a028e0888d027c95e8aed89440368e9cde9
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Thu Oct 2 14:40:58 2014 +0100

    eolian: call the methods/properties from constructors directly for now
---
 src/bin/elua/modules/lualian.lua | 11 ++++++++---
 src/bindings/luajit/eolian.lua   |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index b591c19..e199192 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -422,6 +422,7 @@ end
         if not ctors then return end
         -- collect constructor information
         local ftp = eolian.function_type
+        local dir = eolian.parameter_dir
         s:write("    __eo_ctor = function(")
         local cfuncs, parnames = {}, {}
         for ctor in ctors do
@@ -435,7 +436,9 @@ end
                     end
                 end
                 for par in cfunc:parameters_get() do
-                    parnames[#parnames + 1] = par:name_get()
+                    if par:direction_get() ~= dir.OUT then
+                        parnames[#parnames + 1] = par:name_get()
+                    end
                 end
             end
         end
@@ -443,7 +446,7 @@ end
         s:write(")\n")
         -- write ctor body
         for i, cfunc in ipairs(cfuncs) do
-            s:write("        self:__raw_", cfunc:name_get())
+            s:write("        self:", cfunc:name_get())
             if cfunc:type_get() ~= ftp.METHOD then
                 s:write("_set")
             end
@@ -455,7 +458,9 @@ end
                 end
             end
             for par in cfunc:parameters_get() do
-                fpars[#fpars + 1] = par:name_get()
+                if par:direction_get() ~= dir.OUT then
+                    fpars[#fpars + 1] = par:name_get()
+                end
             end
             s:write(table.concat(fpars, ", "))
             s:write(")\n")
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 3e43750..c8fd6a8 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -802,7 +802,7 @@ ffi.metatype("Eolian_Constructor", {
         end,
 
         function_get = function(self)
-            local v = eolian.eolian_implement_function_get(self)
+            local v = eolian.eolian_constructor_function_get(self)
             if v == nil then return nil end
             return v
         end

-- 


Reply via email to