diff options
author | William Ahern <william@25thandclement.com> | 2016-06-24 19:14:05 -0700 |
---|---|---|
committer | William Ahern <william@25thandclement.com> | 2016-06-24 19:14:05 -0700 |
commit | c429c7d4945d2cddf43d31bd59b45cadea617f82 (patch) | |
tree | 5458f64fbd3a52e7128f8977715b3ee1cac3098a /src/openssl.auxlib.lua | |
parent | dac0e48996b48537fa6d1f6b75b39731b9a58cb2 (diff) | |
parent | bddd9f5a79ae4aea43d7dca09157c53e40503bfb (diff) | |
download | luaossl-c429c7d4945d2cddf43d31bd59b45cadea617f82.tar.gz luaossl-c429c7d4945d2cddf43d31bd59b45cadea617f82.tar.bz2 luaossl-c429c7d4945d2cddf43d31bd59b45cadea617f82.zip |
Merge branch 'ashb-csr_san'
Diffstat (limited to 'src/openssl.auxlib.lua')
-rw-r--r-- | src/openssl.auxlib.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/openssl.auxlib.lua b/src/openssl.auxlib.lua new file mode 100644 index 0000000..4f00c25 --- /dev/null +++ b/src/openssl.auxlib.lua | |||
@@ -0,0 +1,21 @@ | |||
1 | local auxlib = {} | ||
2 | |||
3 | if _VERSION == "Lua 5.1" then | ||
4 | local _pairs = pairs | ||
5 | |||
6 | function auxlib.pairs(t) | ||
7 | if type(t) == "userdata" then | ||
8 | local mt = getmetatable(t) | ||
9 | |||
10 | if mt and mt.__pairs then | ||
11 | return mt.__pairs(t) | ||
12 | else | ||
13 | return _pairs(t) | ||
14 | end | ||
15 | end | ||
16 | end | ||
17 | else | ||
18 | auxlib.pairs = pairs | ||
19 | end | ||
20 | |||
21 | return auxlib | ||