summaryrefslogtreecommitdiff
path: root/otfl-basics-gen.lua
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-09 16:56:50 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-09 16:56:50 +0200
commite67643a60422ed265dc5ad8955a83140598385f1 (patch)
tree09d1fb57f24b4ad8c405a4dafdd5003499009420 /otfl-basics-gen.lua
parentd9475ae1ca5d90213f195ded7c55457a3fe9ca05 (diff)
downloadluaotfload-e67643a60422ed265dc5ad8955a83140598385f1.tar.gz
Adapting to Lua 5.2
Diffstat (limited to 'otfl-basics-gen.lua')
-rw-r--r--otfl-basics-gen.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/otfl-basics-gen.lua b/otfl-basics-gen.lua
index bfd81fd..9a328d0 100644
--- a/otfl-basics-gen.lua
+++ b/otfl-basics-gen.lua
@@ -254,7 +254,8 @@ function caches.compile(data,luaname,lucname)
if d and d ~= "" then
local f = io.open(lucname,'w')
if f then
- local s = loadstring(d)
+ local s
+ if _G["loadstring"] then s=loadstring(d) else s=load(d) end
f:write(string.dump(s))
f:close()
end