diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2015-02-25 14:01:45 +0000 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2015-02-25 14:01:45 +0000 |
commit | 7806e7902430f30548cb79f474bb3c421539ccab (patch) | |
tree | 0cfc8654727b5189f9c97bc5d268f92e56357b7c | |
parent | 2255508b0b32f9f7f52f2f3e08f92e655023dc78 (diff) | |
download | efl-7806e7902430f30548cb79f474bb3c421539ccab.tar.gz |
elua: better mixin behavior (+ fix bad lookup)
-rw-r--r-- | src/bindings/luajit/eo.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bindings/luajit/eo.lua b/src/bindings/luajit/eo.lua index 797aaf95e3..9067a057b0 100644 --- a/src/bindings/luajit/eo.lua +++ b/src/bindings/luajit/eo.lua @@ -212,9 +212,16 @@ end M.class_mixin = function(name, mixin) local cl = classes[name] + local mi = classes[mixin] + local ck = "__mixin_" .. mixin + -- do not mixin if it already has been mixed in previously + -- but only do it for mixins, not for ifaces, for proper lookup order + if mi[ck] and cl[ck] then + return + end -- mixin properties/events - mixin_tbl(cl, mixin, "__properties") - mixin_tbl(cl, mixin, "__events") + mixin_tbl(cl, mi, "__properties") + mixin_tbl(cl, mi, "__events") -- mixin the rest cl:mixin(classes[mixin]) end |