Skip to content

Commit

Permalink
whoops, needed to change gcopen as well in the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffleyland committed Jan 25, 2014
1 parent 2bd0bc5 commit 38bfbf3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/mmapfile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 38bfbf3

Please sign in to comment.