q66 pushed a commit to branch master.

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

commit bf2ac6c93710f36882f91c7895a04bb8dce8ce3d
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Wed May 24 17:40:51 2017 +0200

    elua: update for unit api usage
---
 src/scripts/elua/modules/lualian.lua | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/scripts/elua/modules/lualian.lua 
b/src/scripts/elua/modules/lualian.lua
index e8e6af541e..cfcb1484d9 100644
--- a/src/scripts/elua/modules/lualian.lua
+++ b/src/scripts/elua/modules/lualian.lua
@@ -15,6 +15,8 @@ local func_type = eolian.function_type
 local obj_scope = eolian.object_scope
 local param_dir = eolian.parameter_dir
 
+local gen_unit
+
 cutil.init_module(function()
     dom = log.Domain("lualian")
     if not dom:is_valid() then
@@ -669,7 +671,7 @@ local gen_class = function(klass)
     local mixins  = {} -- also includes ifaces, they're separated later
     for i = 1, #inherits do
         local v = inherits[i]
-        local tp = eolian.class_get_by_name(v):type_get()
+        local tp = eolian.class_get_by_name(gen_unit, v):type_get()
         if tp == class_type.REGULAR or tp == class_type.ABSTRACT then
             parents[#parents + 1] = v
         elseif tp == class_type.INTERFACE or tp == class_type.MIXIN then
@@ -696,14 +698,16 @@ M.system_directory_scan = function()
 end
 
 M.generate = function(fname, fstream)
-    if eolian.file_parse(fname) == nil then
+    local unit = eolian.file_parse(fname)
+    if unit == nil then
         error("Failed parsing file: " .. fname)
     end
+    gen_unit = unit
     if not eolian.database_validate() then
         error("Failed validating database.")
     end
     local sfn = fname:match(".*[\\/](.+)$") or fname
-    local klass = eolian.class_get_by_file(sfn)
+    local klass = eolian.class_get_by_file(unit, sfn)
     File(fname, klass, { gen_class(klass) }):generate(fstream or io.stdout)
 end
 

-- 


Reply via email to