我知道可以通过使用 rawset
来解决这个问题,但我只是想知道为什么以下代码会导致 C 栈溢出。
local mt = {
__newindex = function(self, key, value)
self[key] = value
end
}
local x = setmetatable({}, mt)
x.y = 5
我知道可以通过使用 rawset
来解决这个问题,但我只是想知道为什么以下代码会导致 C 栈溢出。
local mt = {
__newindex = function(self, key, value)
self[key] = value
end
}
local x = setmetatable({}, mt)
x.y = 5