aboutsummaryrefslogtreecommitdiffstats
path: root/src/openssl.auxlib.lua
blob: 4f00c25f95f4eea18bc82aa1a219625c43c5f314 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local auxlib = {}

if _VERSION == "Lua 5.1" then
	local _pairs = pairs

	function auxlib.pairs(t)
		if type(t) == "userdata" then
			local mt = getmetatable(t)

			if mt and mt.__pairs then
				return mt.__pairs(t)
			else
				return _pairs(t)
			end
		end
	end
else
	auxlib.pairs = pairs
end

return auxlib