Skip to content

Commit

Permalink
Make RawFD a noop for passed in RawFD
Browse files Browse the repository at this point in the history
this can happen in the Windows mmap code and it would be much nicer if it
just worked.
  • Loading branch information
Keno committed May 10, 2014
1 parent 645c696 commit fe994bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ unpreserve_handle(x) = (v = uvhandles[x]; v == 1 ? pop!(uvhandles,x) : (uvhandle
immutable RawFD
fd::Int32
RawFD(fd::Integer) = new(int32(fd))
RawFD(fd::RawFD) = fd
end

convert(::Type{Int32}, fd::RawFD) = fd.fd
Expand Down

2 comments on commit fe994bb

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the Windows mmap code works right now (see JuliaIO/HDF5.jl#89, and also possibly https://ci.appveyor.com/project/tkelman/json-jl/build/1.0.18/job/t1vk4i6iqxyhfa05 and https://ci.appveyor.com/project/tkelman/dataframes-jl/build/1.0.5/job/04l8e0iym1pyixy1), but I'll test again to see if this fixes it.

@Keno
Copy link
Member Author

@Keno Keno commented on fe994bb May 10, 2014

Choose a reason for hiding this comment

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

Probably doesn't. I just noticed this error in my Requests.jl AppVeyor logs and figured it can't hurt. There's probably more to be done.

Please sign in to comment.