summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2015-02-25 14:01:45 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2015-02-25 14:01:45 +0000
commit7806e7902430f30548cb79f474bb3c421539ccab (patch)
tree0cfc8654727b5189f9c97bc5d268f92e56357b7c /src/bindings
parent2255508b0b32f9f7f52f2f3e08f92e655023dc78 (diff)
elua: better mixin behavior (+ fix bad lookup)
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/luajit/eo.lua11
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
212 212
213M.class_mixin = function(name, mixin) 213M.class_mixin = function(name, mixin)
214 local cl = classes[name] 214 local cl = classes[name]
215 local mi = classes[mixin]
216 local ck = "__mixin_" .. mixin
217 -- do not mixin if it already has been mixed in previously
218 -- but only do it for mixins, not for ifaces, for proper lookup order
219 if mi[ck] and cl[ck] then
220 return
221 end
215 -- mixin properties/events 222 -- mixin properties/events
216 mixin_tbl(cl, mixin, "__properties") 223 mixin_tbl(cl, mi, "__properties")
217 mixin_tbl(cl, mixin, "__events") 224 mixin_tbl(cl, mi, "__events")
218 -- mixin the rest 225 -- mixin the rest
219 cl:mixin(classes[mixin]) 226 cl:mixin(classes[mixin])
220end 227end