projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
212571c
)
elua: multiple inheritance aware is_a
author
Daniel Kolesa
<d.kolesa@samsung.com>
Wed, 25 Feb 2015 15:16:35 +0000
(15:16 +0000)
committer
Daniel Kolesa
<d.kolesa@samsung.com>
Wed, 25 Feb 2015 15:16:35 +0000
(15:16 +0000)
src/scripts/elua/core/util.lua
patch
|
blob
|
history
diff --git
a/src/scripts/elua/core/util.lua
b/src/scripts/elua/core/util.lua
index
5333899
..
e6d59f4
100644
(file)
--- 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 p
t = self.__proto
- local is = (pt == base)
- while not is and pt do
- pt = pt.__proto
- is = (pt == base)
+ local p
rotos = 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)