Skip to content

Commit

Permalink
Remove VERSION >= v"1.4" checks (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Mar 5, 2024
1 parent efccf5b commit 17636eb
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ function Base.unsafe_read(stream::TranscodingStream, output::Ptr{UInt8}, nbytes:
m = min(buffersize(buffer), p_end - p)
copydata!(p, buffer, m)
p += m
@static if VERSION >= v"1.4"
GC.safepoint()
end
GC.safepoint()
end
if p < p_end && eof(stream)
throw(EOFError())
Expand Down Expand Up @@ -493,9 +491,7 @@ function Base.unsafe_write(stream::TranscodingStream, input::Ptr{UInt8}, nbytes:
m = min(marginsize(buffer1), p_end - p)
copydata!(buffer1, p, m)
p += m
@static if VERSION >= v"1.4"
GC.safepoint()
end
GC.safepoint()
end
return Int(p - input)
end
Expand Down Expand Up @@ -728,13 +724,9 @@ function writedata!(output::IO, input::Buffer)
n = GC.@preserve input Base.unsafe_write(output, bufferptr(input), buffersize(input))
consumed!(input, n)
nwritten += n
@static if VERSION >= v"1.4"
GC.safepoint()
end
end
@static if VERSION >= v"1.4"
GC.safepoint()
end
GC.safepoint()
return nwritten
end

Expand Down

0 comments on commit 17636eb

Please sign in to comment.