we don't need __ipairs in lua 5.3

This commit is contained in:
Cloud Wu
2015-01-05 21:58:50 +08:00
parent ac85ff82a1
commit 309e26ba7a

View File

@@ -91,24 +91,6 @@ function meta:__len()
return len(getcobj(self))
end
local function conf_ipairs(self, index)
local obj = getcobj(self)
index = index + 1
local value = rawget(self, index)
if value then
return index, value
end
local sz = len(obj)
if sz < index then
return
end
return index, self[index]
end
function meta:__ipairs()
return conf_ipairs, self, 0
end
function meta:__pairs()
return conf.next, self, nil
end