From 87bfb21340d8f59a9398238254f4ebf93aa7b398 Mon Sep 17 00:00:00 2001 From: Nathan Zimmerberg <39104088+nhz2@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:00:11 -0400 Subject: [PATCH] Fixes for Julia 1.11 (#53) --- src/classic.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/classic.jl b/src/classic.jl index 4d45d4c..3f07083 100644 --- a/src/classic.jl +++ b/src/classic.jl @@ -51,11 +51,14 @@ function write_finish(patch::ClassicPatch) for stream in (patch.ctrl, patch.diff, patch.data) write(stream, TranscodingStreams.TOKEN_END) end - write_int(patch.io, patch.ctrl.stream.size) - write_int(patch.io, patch.diff.stream.size) + ctrl_v = take!(patch.ctrl.stream) + diff_v = take!(patch.diff.stream) + data_v = take!(patch.data.stream) + write_int(patch.io, length(ctrl_v)) + write_int(patch.io, length(diff_v)) write_int(patch.io, patch.new_size) - for stream in (patch.ctrl, patch.diff, patch.data) - write(patch.io, resize!(stream.stream.data, stream.stream.size)) + for v in (ctrl_v, diff_v, data_v) + write(patch.io, v) end flush(patch.io) finalize(patch)