@@ -378,7 +378,7 @@ function isopen(x::Union{LibuvStream, LibuvServer})
378
378
if x. status == StatusUninit || x. status == StatusInit
379
379
throw (ArgumentError (" $x is not initialized" ))
380
380
end
381
- return x. status:: Int != StatusClosed && x. status:: Int != StatusEOF
381
+ return x. status != StatusClosed && x. status != StatusEOF
382
382
end
383
383
384
384
function check_open (x:: Union{LibuvStream, LibuvServer} )
@@ -453,7 +453,7 @@ function close(stream::Union{LibuvStream, LibuvServer})
453
453
stream. status = StatusClosing
454
454
elseif isopen (stream) || stream. status == StatusEOF
455
455
should_wait = uv_handle_data (stream) != C_NULL
456
- if stream. status:: Int != StatusClosing
456
+ if stream. status != StatusClosing
457
457
ccall (:jl_close_uv , Cvoid, (Ptr{Cvoid},), stream. handle)
458
458
stream. status = StatusClosing
459
459
end
@@ -468,7 +468,7 @@ function uvfinalize(uv::Union{LibuvStream, LibuvServer})
468
468
iolock_begin ()
469
469
if uv. handle != C_NULL
470
470
disassociate_julia_struct (uv. handle) # not going to call the usual close hooks
471
- if uv. status:: Int != StatusUninit
471
+ if uv. status != StatusUninit
472
472
close (uv)
473
473
else
474
474
Libc. free (uv. handle)
@@ -582,7 +582,7 @@ function uv_alloc_buf(handle::Ptr{Cvoid}, size::Csize_t, buf::Ptr{Cvoid})
582
582
stream = unsafe_pointer_to_objref (hd):: LibuvStream
583
583
584
584
local data:: Ptr{Cvoid} , newsize:: Csize_t
585
- if stream. status:: Int != StatusActive
585
+ if stream. status != StatusActive
586
586
data = C_NULL
587
587
newsize = 0
588
588
else
@@ -615,7 +615,7 @@ function uv_readcb(handle::Ptr{Cvoid}, nread::Cssize_t, buf::Ptr{Cvoid})
615
615
if isa (stream, TTY)
616
616
stream. status = StatusEOF # libuv called uv_stop_reading already
617
617
notify (stream. cond)
618
- elseif stream. status:: Int != StatusClosing
618
+ elseif stream. status != StatusClosing
619
619
# begin shutdown of the stream
620
620
ccall (:jl_close_uv , Cvoid, (Ptr{Cvoid},), stream. handle)
621
621
stream. status = StatusClosing
@@ -725,7 +725,7 @@ show(io::IO, stream::Pipe) = print(io,
725
725
726
726
function open_pipe! (p:: PipeEndpoint , handle:: OS_HANDLE )
727
727
iolock_begin ()
728
- if p. status:: Int != StatusInit
728
+ if p. status != StatusInit
729
729
error (" pipe is already in use or has been closed" )
730
730
end
731
731
err = ccall (:uv_pipe_open , Int32, (Ptr{Cvoid}, OS_HANDLE), p. handle, handle)
@@ -1119,7 +1119,7 @@ _fd(x::Union{OS_HANDLE, RawFD}) = x
1119
1119
1120
1120
function _fd (x:: Union{LibuvStream, LibuvServer} )
1121
1121
fd = Ref {OS_HANDLE} (INVALID_OS_HANDLE)
1122
- if x. status:: Int != StatusUninit && x. status:: Int != StatusClosed
1122
+ if x. status != StatusUninit && x. status != StatusClosed
1123
1123
err = ccall (:uv_fileno , Int32, (Ptr{Cvoid}, Ptr{OS_HANDLE}), x. handle, fd)
1124
1124
# handle errors by returning INVALID_OS_HANDLE
1125
1125
end
0 commit comments