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 committed Nov 14, 2014
1 parent 0a73bbd commit c6bdbfe
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

3 comments on commit c6bdbfe

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nolta this is good to @JuliaBackports right?

@nolta
Copy link
Member Author

@nolta nolta commented on c6bdbfe Nov 19, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be, although i think it's only triggered on 0.4.

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange? the version of libuv used on release-0.3 has the same signature for uv_fs_write, so backported in e93af36

Please sign in to comment.