q66 pushed a commit to branch master.

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

commit 1e83761810e337eac94bb94f39053f511b0a1083
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Wed Feb 25 15:16:35 2015 +0000

    elua: multiple inheritance aware is_a
---
 src/scripts/elua/core/util.lua | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/scripts/elua/core/util.lua b/src/scripts/elua/core/util.lua
index 5333899..e6d59f4 100644
--- a/src/scripts/elua/core/util.lua
+++ b/src/scripts/elua/core/util.lua
@@ -52,13 +52,13 @@ M.Object = {
 
     is_a = function(self, base)
         if self == base then return true end
-        local pt = self.__proto
-        local is = (pt == base)
-        while not is and pt do
-            pt = pt.__proto
-            is = (pt == base)
+        local protos = self.__protos
+        for i = 1, #protos do
+            if protos[i]:is_a(base) then
+                return true
+            end
         end
-        return is
+        return false
     end,
 
     add_parent = function(self, parent)

-- 


Reply via email to