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.

backport of c6bdbfe
Conflicts:
	base/fs.jl
	src/jl_uv.c
  • Loading branch information
nolta authored and tkelman committed Nov 19, 2014
1 parent 28e5f11 commit e93af36
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 @@ -164,7 +164,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 @@ -442,7 +442,7 @@ DLLEXPORT int jl_fs_symlink(char *path, char *new_path, int flags)
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 e93af36

Please sign in to comment.