diff options
author | Vanya Sergeev <vsergeev@gmail.com> | 2016-02-06 13:09:44 +0300 |
---|---|---|
committer | Vanya Sergeev <vsergeev@gmail.com> | 2016-02-06 13:10:45 +0300 |
commit | ee99fc4446edbdfd7ca72853cec9154d760c5ecb (patch) | |
tree | 88e5c0ff7e7551da9b4c2ef43c50b3301de3d96e | |
parent | 1ae1458706758122c1358193bd2945e31bddc62c (diff) |
Fix running in torch-less env with stub for torch.setheaptracking()
This commit stubs out torch.setheaptracking(), so trepl can be run in a
torch-less environment. It fixes the following error:
$ th
/usr/bin/lua5.1: /usr/share/lua/5.1/trepl/init.lua:692: attempt to call field 'setheaptracking' (a nil value)
stack traceback:
/usr/share/lua/5.1/trepl/init.lua:692: in main chunk
[C]: in function 'require'
/usr/lib/luarocks/rocks-5.1/trepl/scm-1/bin/th:104: in main chunk
[C]: ?
$
-rw-r--r-- | init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -132,7 +132,8 @@ local selfhelp = [[ -- If no Torch: if not torch then torch = { - typename = function() return '' end + typename = function() return '' end, + setheaptracking = function() end } end |