Skip to content

Commit

Permalink
fix jl_fs_write type sig
Browse files Browse the repository at this point in the history
uv_fs_write:offset is int64_t, not size_t.

Closes JuliaGraphics/Winston.jl#182.
  • Loading branch information
nolta authored and waTeim committed Nov 23, 2014
1 parent 99cb268 commit d4cb1e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/fs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function write(f::File, buf::Ptr{UInt8}, len::Integer, offset::Integer=-1)
if !f.open
error("file is not open")
end
err = ccall(:jl_fs_write, Int32, (Int32, Ptr{UInt8}, Csize_t, Csize_t),
err = ccall(:jl_fs_write, Int32, (Int32, Ptr{UInt8}, Csize_t, Int64),
f.handle, buf, len, offset)
uv_error("write",err)
len
Expand Down
2 changes: 1 addition & 1 deletion src/jl_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ DLLEXPORT int jl_fs_chmod(char *path, int mode)
return ret;
}

DLLEXPORT int jl_fs_write(int handle, char *data, size_t len, size_t offset)
DLLEXPORT int jl_fs_write(int handle, char *data, size_t len, int64_t offset)
{
uv_fs_t req;
uv_buf_t buf[1];
Expand Down

0 comments on commit d4cb1e2

Please sign in to comment.