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