diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-04-08 19:13:51 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-04-08 19:13:51 +0200 |
commit | f3495d7db72f854d8f7560a6ff11fa9012003062 (patch) | |
tree | 38b9ad5b0d15ccd5c8288be2221defc091eada64 /lualibs-lua.lua | |
parent | 233c885a37efeabaab00c68f1dd4262705a0ac9e (diff) | |
parent | 935306412b57f436fcb5307a14941ded3eb3168d (diff) | |
download | lualibs-f3495d7db72f854d8f7560a6ff11fa9012003062.tar.gz |
Merge pull request #29 from phi-gamma/master
version 2.4
Diffstat (limited to 'lualibs-lua.lua')
-rw-r--r-- | lualibs-lua.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lualibs-lua.lua b/lualibs-lua.lua index cb61829..b90f37e 100644 --- a/lualibs-lua.lua +++ b/lualibs-lua.lua @@ -19,12 +19,20 @@ if not modules then modules = { } end modules ['l-lua'] = { -- compatibility hacksand helpers -local major, minor = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION, _MINORVERSION = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION = tonumber(major) or 5 -_MINORVERSION = tonumber(minor) or 1 +_MAJORVERSION = tonumber(_MAJORVERSION) or 5 +_MINORVERSION = tonumber(_MINORVERSION) or 1 _LUAVERSION = _MAJORVERSION + _MINORVERSION/10 +if _LUAVERSION < 5.2 and jit then + -- + -- we want loadstring cum suis to behave like 5.2 + -- + _MINORVERSION = 2 + _LUAVERSION = 5.2 +end + -- lpeg if not lpeg then |