Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Bosman <tudorb@fb.com>2014-07-10 19:46:36 +0400
committerTudor Bosman <tudorb@fb.com>2014-07-10 19:46:36 +0400
commite655a3df6d0c31efd0b0444eb5cc6734184f7895 (patch)
tree6cbeebf44ac1f034d9c38a48a398e696d553a59f /init.lua
parent7a8429c3fb2eff785bc4cbef49e1d9f65d45e3de (diff)
lua 5.2 compat
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 5108a16..92640b1 100644
--- a/init.lua
+++ b/init.lua
@@ -1,5 +1,12 @@
-- We are using paths.require to appease mkl
+
+-- Make this work with LuaJIT in Lua 5.2 compatibility mode, which
+-- renames string.gfind (already deprecated in 5.1)
+if not string.gfind then
+ string.gfind = string.gmatch
+end
+
require "paths"
paths.require "libtorch"