From 38bfbf3479598437101556d8bcdd699d909bae4b Mon Sep 17 00:00:00 2001 From: Geoff Leyland Date: Sat, 25 Jan 2014 21:38:47 +1300 Subject: [PATCH] whoops, needed to change gcopen as well in the last commit --- lua/mmapfile.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/mmapfile.lua b/lua/mmapfile.lua index 8b9d983..b185e5a 100644 --- a/lua/mmapfile.lua +++ b/lua/mmapfile.lua @@ -192,8 +192,11 @@ end local function gcopen( filename, -- string: name of the file to open. type, -- ?string: type to allocate - mode) -- ?string: open mode for the file "r" or "rw" - local addr, size = open(filename, type, mode) + mode, -- ?string: open mode for the file "r" or "rw" + size, -- ?integer: size to map (in multiples of type). Default + -- is file size + offset) -- ?integer: offset into the file (default 0) + local addr, size = open(filename, type, mode, size, offset) return ffi.gc(addr, close), size end