[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: metatable indirection limit. Why?
- From: Emmanuel Oga <emmanueloga@...>
- Date: Thu, 8 Mar 2012 20:31:28 -0300
Doing an experiment on chaining metatables I came up with this test code:
http://pastie.org/3551948
the pattern is:
Obj1 = { test = function() print("ok") end }
Obj2 = {}
setmetatable(Obj2, { __index = Obj1 })
Obj3 = {}
setmetatable(Obj3, { __index = Obj2 })
Obj3.test()
etc...
Interestingly, both lua and luajit halt when the number of
"indirections" is > 99, and I was wondering why.
--
--------------------------------------------------------------
EmmanuelOga.com - Software Developer