summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <quaker66@gmail.com>2014-02-20 13:40:42 +0000
committerDaniel Kolesa <quaker66@gmail.com>2014-02-20 13:40:42 +0000
commitfcf417cfdf9100b179b4440070f80d2c671d69dc (patch)
tree6318f565dd4db914010ca47e26a5cf7ebf5c68b1
parente4b59b939da20031cb710df700120c1cbc38fee0 (diff)
fix
-rw-r--r--require.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/require.lua b/require.lua
index 99d66b0..7e49e3f 100644
--- a/require.lua
+++ b/require.lua
@@ -1,3 +1,5 @@
1local ffi = require and require("ffi") or ffi
2
1ffi.cdef [[ 3ffi.cdef [[
2 void *fopen (const char *fname, const char *mode); 4 void *fopen (const char *fname, const char *mode);
3 int fseek (void *f, long offset, int origin); 5 int fseek (void *f, long offset, int origin);
@@ -13,7 +15,7 @@ ffi.cdef [[
13 15
14local C = ffi.C 16local C = ffi.C
15 17
16local loaded = { ["ffi"] = require and require("ffi") or ffi } 18local loaded = { ["ffi"] = ffi }
17local loader = function(modname) 19local loader = function(modname)
18 local fname = ffi.new("char[?]", #modname + 5, modname) 20 local fname = ffi.new("char[?]", #modname + 5, modname)
19 local p = C.strchr(fname, 46) 21 local p = C.strchr(fname, 46)