summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-l-lua.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-04-17 12:45:14 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-04-17 12:45:14 +0200
commitc8734018b81eb2120372493a3767617eeaf0299c (patch)
tree987d7791ae6f39bcf371c72f87d6e8cf759f0c75 /src/fontloader/misc/fontloader-l-lua.lua
parentfc973a6dde1a78a59e50bc3850dfd0d06e7b2a03 (diff)
parent97ec9e582e5be33001c136a9c69b5eebee4fdb2a (diff)
downloadluaotfload-c8734018b81eb2120372493a3767617eeaf0299c.tar.gz
Merge pull request #330 from phi-gamma/master
fontloader update
Diffstat (limited to 'src/fontloader/misc/fontloader-l-lua.lua')
-rw-r--r--src/fontloader/misc/fontloader-l-lua.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fontloader/misc/fontloader-l-lua.lua b/src/fontloader/misc/fontloader-l-lua.lua
index cb61829..b90f37e 100644
--- a/src/fontloader/misc/fontloader-l-lua.lua
+++ b/src/fontloader/misc/fontloader-l-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